How do you find the key from the sharps or flats?

With sharps, the key is a half step above the last sharp. With flats, the key is the second-to-last flat. One flat is F major.

Sharps: look at the last sharp in the signature and go up one half step. Three sharps, F♯ C♯ G♯, ends on G♯. A half step above G♯ is A, so the key is A major.

Flats: look at the second-to-last flat. Three flats, B♭ E♭ A♭, has E♭ second from the end, so the key is E♭ major.

One flat is the exception, because there is no second-to-last flat. One flat, B♭, is always F major.

Want to practise it? Try the key signatures and naturals game, one minute a round.