What key is “Lucy in the Sky With Diamonds” written in? It’s not easy to say; the harmony is strangely ambiguous. Musicologist Naphtali Wagner found that the song is notated differently in two reasonably authoritative sources, Wise Publications’ The Beatles Complete (1983) and Hal Leonard’s The Beatles: Complete Scores (1993):

And he found that scholars disagree as well:

Steven Porter believes that it’s in A major, “surrounded by tonicized structural neighbour tones (B♭ major and G major), as a sort of substitute for the absence of a structural dominant.”

Walter Everett believes it’s in G major, citing a voice-leading graph that opens with the hypothetical notes G and B in the outer voices.

Allan Moore is ambivalent: The scale steps in the upper voice suggest G major, but the bass line contradicts this, and the key signatures suggest D major.

Wagner shows that a case can be made for three rival interpretations: A major, D major, and G major. “Each is consistent with the Beatles’ harmonic style and has precedents in many other songs.” But he adds that one solution might be to abandon the idea of monotonality and see the song as oscillating between two keys: A in the chorus and pre-chorus and G in the chorus. “This version could be defended with the argument that oscillation between tonal centres separated by a major second is found in other Beatles songs, such as ‘Doctor Robert,’ ‘Good Day Sunshine’ and ‘Penny Lane.'”

(Naphtali Wagner, “The Beatles’ Psycheclassical Synthesis: Psychedelic Classicism and Classical Psychedelia in Sgt. Pepper,” in Oliver Julien, ed., Sgt. Pepper and the Beatles, 2008.)