The one rule behind every capo position
A capo shortens every string by the same amount, which raises whatever shape you play by exactly one semitone per fret. That is the entire rule: an open G shape with no capo sounds as G, the same shape with a capo on fret 1 sounds as G#/Ab, and with a capo on fret 2 it sounds as A. Counting up by semitones from any open shape (G, A, B, C, D, E) tells you exactly what key that shape sounds in at any fret from 0 to 7.
Going the other way works the same way in reverse: to find a capo fret for a target key, count the semitones from your chosen open shape up to that key. G to Bb is three semitones (G, G#, A, A#/Bb), so G shapes need a capo on fret 3 to sound in Bb. The calculator runs this both directions so you never have to count frets on your fingers.