I've long had this question. I know some music theory, but I can only get a vague idea as to the progression of keys when moving the capo down a guitar's neck. I'm fairly certain that the guitar is in the key of E minor when no capo is used, but that may be wrong. When playing some songs, the instructions for capo position aren't something like "Capo on fret 3", but, instead, "Capo: C Major" or "Key: C Major". I've tried to find a description of this online, but the closest things that I've been able to find are descriptions of how to transpose chords to different keys. Any help is appreciated, and I wouldn't be surprised if I had some gross conceptual error.
The capo allows you to play a song in a particular key using chord shapes and formations from a different key. For example if you like to use the open (first position) chords in the key of G major such as G, C, D, Em and Am but want to sing a song in the key of A, you can put a capo on the second fret and play the chords as if you were playing in the key of G.
So when you play a G chord with the capo on the 2nd fret, it will actually be an A chord. It will look like a G chord but sound like an A chord.
To determine what key you will be playing in based on a given capo position, take the key corresponding to the chord shapes you want to play and then add a semitone or half step for each fret position. Note that there is only a half step or one semi-tone between E and F and between B and C.
So if you play chords from the G set and you put the Capo on the 1st fret - you take G and add one half step (one semi-tone). G plus a semitone = Ab or G# (same note on a guitar). If capo goes on second fret add two semitones - G plus 2 semitones = A. So playing a G chord formation with the capo on second fret, gives you a chord that sounds like (and technically is) an A chord. With capo on third fret - if you play chords for key of G - take G and add 3 semitones and you get Bb or A#. G-(+1Ab)-(+2A)-(+3 = Bb).
If you put the capo on the first fret and play chords as if in the key of C (such as C, F & G) you take C and add 1 semitone and get C# or Db (same note - two different names depending on the frame of reference). If the capo is on 2nd fret and you play a C chord it will sound as (and technically be) a D chord. C plus 1 semitone = C# - C plus 2 semitones (capo on 2nd fret) = D.
This formula will work for any capo position and any chord set. Another way to approach using a capo to transpose is to first decide what chord set you want to use. Then decide what key you want the song to be in. Then count the semitones between the two keys and that will tell you the fret to put the capo on. So if you want to play chords that are in G but want the song to be in the key of A - start with G (the root of the key of G that you want to play the chord formations from) and count to A in an ascending direction - and you get two. G-(+1G#)-(+2 = A).
Sometimes you will find that this approach puts your capo on a fret too close to the body to play comfortably. For example - if you wanted to use G shaped chords to play in the key of E you would go G-G#(1)-A(2)-A#(3)-B(4)-C(5)-C#(6)-D(7)-D#(8) - E = 9th fret.
Ninth fret leaves very little room to maneuver so you could look at alternative chord sets (if for some reason you did not want to play the chords from the E set of chords). For example - it's easy to see that the distance between D and E is much closer than between G and E. So if we want to play chords from the D set but play in the key of E - we start with D and count the steps to E and we get 2 so we put the capo on the 2nd fret and play a D chord and it comes out as an E chord. D plus two semitones equals E.
One easy way to calculate this if you have a piano keyboard (or picture of one) handy, is to start with the key that corresponds to the chord set you want to play and start going up the piano keys until you get to the key you want to play in. The number of keys you count in order (black and white keys) ending with the key you want the song to sound in - gives you the capo position.
Or if you don't want to do all the counting, just print this chart.
It doesn't quite work like that. The guitar doesn't exactly have a single key that its "in". Instead it has chords that are easier and more difficult to play. Some relatively easy ones (sticking with just major chords) include C, G, D, A, and E, which allows you to play in quite a few different keys. If you were playing in the key of D, you'd likely see a lot of G, D, and A chords. If you were playing in A, you'd probably see a lot of D, A, and E chords. Add a few more chords in there, along with minors and sevenths, and you can get quite a range of potential keys, even without using a capo.
What a capo does is transpose up whatever you play by a certain number of half steps, equal to the number of the fret the capo is on.
So, for example, a capo on the first fret will make all chords one half step higher. A G chord becomes an A♭, and A chord becomes a B♭, and E chord becomes an F, and etc... If you place a capo on the second fret, they all get transposed up by two half steps. So your G and A chords would become A and B chords, respectively.
Notice the redundancy: you can still play an A chord, but you have to finger it as a G chord. This can get quickly get confusing if you're not used to thinking that way (or even if you are), so when a piece is to be capo'd, the written chords are are the shape that you finger, not what the chord actually sounds like after being transposed by the capo.
As an example, lets say that you want to play a piece in C major, and you know what the actual chords are. It probably has a lot of F's, C's, and G's in it. This is playable without a capo, although the F is a difficult barre chord. What you can do, is play it in a lower key (so we have to count down backwards), and then use the capo to transpose everything up. In this case, if you were to use a capo on the first fret, you'd have to play E, B, and F&sharp, which is more difficult. At the second fret, you'd have to play an E♭, B♭, and F, which are terrible guitar chords. At the third fret, you get to play D, A, and E, which are all easy guitar chords. So you could transpose the written-down chords to A, and then use a capo to transpose the actual pitches back up to C. But this doesn't mean that the third fret "corresponds to" the key of C. It's just the chords you play in the key of A are significantly easier to play than the chords in C, and A is three half steps below C.
I hope that all made sense...