In D major, F is F (sharp)The key signature of D major puts a sharp on every F.

An accidental is a sharp, flat, or natural sign that raises, lowers, or resets a note. In any key, each letter of the musical alphabet carries a fixed accidental set by the key signature. Pick a key and a note letter and this tool tells you which one that letter takes, spells the resulting note, and draws it on the staff.

Here’s what accidentals are, how a key assigns one to each letter, and why the same note can be written two different ways.

How to use it

Choose a key, then pick a note letter from A to G. The tool shows the accidental that letter carries in that key — sharp, flat, or natural — spells out the full note name, and places it on the staff so you can see where it sits. Change the key and the same letter may take a different accidental.

Why it helps

Sight-reading depends on knowing, without thinking, which notes a key raises or lowers. This tool makes that mapping concrete: pick any letter and see instantly what the key does to it. Doing this a few times per key builds the reflex that lets you read fluently instead of pausing to work out each accidental.

What it shows

  • The accidental a chosen letter carries in a chosen key.
  • The fully spelled note name, with its sharp, flat, or natural.
  • The note drawn on the staff in its correct position.

An accidental is a symbol that changes a note’s pitch: a sharp raises it, a flat lowers it, and a natural cancels either one. In written music, accidentals do two jobs. They appear at the start of a staff as a key signature, setting a fixed rule for the whole piece, and they appear beside individual notes to make a temporary change. This tool answers a precise question that comes up constantly when you read music: given a key and a letter name, what accidental does that letter carry, and what is the note actually called? Below is how accidentals work, how a key signature assigns one to each letter, and why the same sounding note can be spelled in more than one way.

What an accidental is

The seven letters A through G name the natural notes — the white keys on a piano. Accidentals let you reach the notes in between and adjust the naturals up or down. A sharp raises a note by a half step, the smallest distance in Western music. A flat lowers it by a half step. A natural sign cancels a previous sharp or flat and returns the note to its plain, unaltered pitch. Every note you can play is one of the seven letters carrying one of these signs, which is why understanding accidentals is the key to reading any note on the staff.

Double sharps and double flats

Two less common accidentals push a note further. A double sharp, written like a small x, raises a note by two half steps — a whole step — so F double sharp sounds the same as G. A double flat, written as two flat signs, lowers a note by a whole step, so B double flat sounds the same as A. These look intimidating but exist for a simple reason: in certain keys, spelling a note with a double sharp or flat keeps the music’s letter names consistent, so a scale still reads as one of each letter in order rather than skipping around. They are spelling conventions, not new sounds.

How a key signature assigns an accidental to each letter

A key signature is a group of sharps or flats printed once at the start of the staff. Its rule is absolute within the piece: every note on an affected letter takes that accidental, in every octave, unless a temporary accidental overrides it. In D major, whose signature is F sharp and C sharp, every F is played as F sharp and every C as C sharp, while the other five letters stay natural. So a key signature is really a lookup table that assigns each of the seven letters a fixed accidental — sharp, flat, or natural — and that is exactly the table this tool reads out for you one letter at a time.

The order of sharps and flats

The sharps and flats in a key signature are never in a random order. Sharps are always added in the sequence F, C, G, D, A, E, B, and flats in the exact reverse. Knowing the order lets you work out which letters a key affects: a key with three sharps affects F, C, and G — the first three on the list — so those letters are sharp and the rest are natural. A key with two flats affects B and E, the first two flats, leaving the rest natural.

AccidentalOrder (first to last)
SharpsF C G D A E B
FlatsB E A D G C F

Every key and the accidentals it uses

Put the order together with the count and you can read off exactly which letters each key alters. The table below lists all fifteen major keys, the accidentals in their signatures, how many there are, and the relative minor that shares the same set. Any letter not listed for a key is played natural in that key.

Major keySharps or flatsCountRelative minor
C majornone0A minor
G majorF♯1 sharpE minor
D majorF♯ C♯2 sharpsB minor
A majorF♯ C♯ G♯3 sharpsF♯ minor
E majorF♯ C♯ G♯ D♯4 sharpsC♯ minor
B majorF♯ C♯ G♯ D♯ A♯5 sharpsG♯ minor
F♯ majorF♯ C♯ G♯ D♯ A♯ E♯6 sharpsD♯ minor
C♯ majorF♯ C♯ G♯ D♯ A♯ E♯ B♯7 sharpsA♯ minor
F majorB♭1 flatD minor
B♭ majorB♭ E♭2 flatsG minor
E♭ majorB♭ E♭ A♭3 flatsC minor
A♭ majorB♭ E♭ A♭ D♭4 flatsF minor
D♭ majorB♭ E♭ A♭ D♭ G♭5 flatsB♭ minor
G♭ majorB♭ E♭ A♭ D♭ G♭ C♭6 flatsE♭ minor
C♭ majorB♭ E♭ A♭ D♭ G♭ C♭ F♭7 flatsA♭ minor

Natural versus altered notes

Within any key, the letters split into two groups: those the signature alters and those it leaves alone. In A major, whose signature is F sharp, C sharp, and G sharp, the letters F, C, and G are altered to sharps while A, B, D, and E stay natural. This is worth internalizing key by key, because fluent reading is mostly a matter of knowing instantly which of the seven letters a key touches. Picking each letter in turn here and seeing whether it comes back sharp, flat, or natural is a direct way to drill that.

Courtesy accidentals

Sometimes you will see a natural or a sharp printed on a note where the key signature already implies it. These are courtesy accidentals, also called cautionary accidentals, and they carry no new instruction — they simply remind the reader of the correct pitch after a passage that might have caused doubt, often because a temporary accidental appeared earlier in the bar. A courtesy accidental is a kindness from the engraver, not a change to the note, and it is frequently written in parentheses to signal exactly that.

How a temporary accidental behaves in a bar

An accidental written beside a note, rather than in the key signature, changes that note for the rest of the bar it appears in, at that pitch, and then expires at the bar line. If a piece in C major has a bar where one F is marked sharp, every following F in that same bar is also sharp, but the next bar reverts to plain F unless marked again. This bar-long rule is why courtesy accidentals are useful, and why reading accidentals means watching both the key signature and any temporary marks in the current bar.

Enharmonic spelling: why the same note has two names

Here is where accidentals get subtle. The black key between C and D can be called C sharp or D flat — the same pitch, two names. Notes related this way are called enharmonic equivalents, and which name is correct depends entirely on the key. In a sharp key the note will be spelled as a sharp; in a flat key, as a flat. The rule behind the choice is that a scale should use each letter name once, in order, with no letter repeated or skipped. That is why the key of D flat major spells its notes with flats — D flat, E flat, F, G flat, and so on — while C sharp major, the same pitches, spells everything with sharps. The sounds are identical; the spelling keeps the notation readable.

Why this matters for reading and writing music

Correct spelling is not fussiness. A note spelled the right way tells a player how it functions and where it is likely headed, and it keeps chords and scales looking consistent on the page. Write a passage with the wrong enharmonic spelling and it becomes harder to read, even though it would sound the same. This is exactly why the tool spells the note fully rather than just naming a piano key: knowing that a note is A flat rather than G sharp, in the key you are working in, is part of reading and writing music correctly.

Whether a key uses sharps or flats

No key mixes sharps and flats in its signature — a key is either a sharp key or a flat key, never both. This follows from the way the two orders build up from opposite ends of the same list. So the first thing to settle when you look up a letter is which family the key belongs to. C major uses neither. Keys such as G, D, A, and E rise through the sharp order, while keys such as F, B flat, E flat, and A flat descend through the flat order. Knowing the family in advance tells you immediately whether any altered letter will come back as a sharp or as a flat, which is half the answer before you even count.

Accidentals apply across every octave

One point that trips up new readers is that a key signature is not tied to a single line or space on the staff. If the signature sharpens F, then every F is sharp — the low F below the staff, the F in the middle, and the F above it alike. The sharp sign is drawn on one particular F in the signature purely by convention, but its instruction covers the letter in all registers. The same holds for a temporary accidental within a bar at that pitch. This tool spells the note and places it on the staff, but the accidental it reports is the rule for that letter throughout the key, not just for the octave shown.

A short history of accidentals

Accidentals grew out of a very old problem. Medieval musicians found that one note, B, sometimes needed to be lowered to sound right, and they wrote it two ways: a rounded b for the lowered, softer version and a square b for the natural, harder one. Those two shapes are the direct ancestors of today’s flat sign and of the natural and sharp signs, which is why the flat still looks like a lowercase b. As Western music adopted twelve equal pitches per octave, the system settled into the sharps, flats, and naturals we use now, along with the key signatures that organize them. The symbols are centuries old, but the logic they encode is exactly the one this calculator applies.

Using it with the other tools

The accidental calculator answers a narrow, practical question, and it sits alongside tools that widen the view. The key signature finder shows the whole signature a key uses and draws it on the staff, so you can see all the altered letters at once. The scale finder spells out the full scale a key produces, and the note finder shows where a given note name sits across the keyboard. Reach for the accidental calculator when you have a specific letter and key in mind and just need to know: sharp, flat, or natural.

A quick way to check any letter in any key

To do this by hand, recall the key’s signature, then see whether your letter is one of the sharps or flats it lists. If it is, the letter takes that accidental; if it is not, the letter is natural. In E flat major, whose flats are B, E, and A, the letter E is flat, the letter D is natural, and the letter B is flat. The calculator performs that check instantly and shows the result on the staff, which makes it a fast way to confirm a note while you read, write, or transpose.

Frequently asked questions

What is an accidental in music?
It is a symbol that changes a note's pitch. A sharp raises the note a half step, a flat lowers it a half step, and a natural cancels a previous sharp or flat. Double sharps and double flats move the note by a whole step for spelling reasons.
How does a key signature decide a note's accidental?
The key signature lists the sharps or flats that apply to the whole piece. Every note on an affected letter takes that accidental in every octave. In D major the signature is F sharp and C sharp, so every F and C is sharp and the other letters stay natural.
What is the difference between a natural and an altered note?
A natural note is a plain white-key letter with no sharp or flat, while an altered note carries an accidental from the key signature or a temporary mark. In A major, F, C, and G are altered to sharps; A, B, D, and E stay natural.
What is a courtesy accidental?
A courtesy or cautionary accidental restates a pitch the key signature already implies, usually after an earlier temporary accidental caused doubt. It adds no new instruction and is often written in parentheses as a reminder to the reader.
Why is the same note sometimes called C sharp and sometimes D flat?
They are enharmonic equivalents — the same pitch spelled two ways. The correct name depends on the key, because a scale should use each letter once in order. Sharp keys spell the note as a sharp; flat keys spell it as a flat. The sound is identical.
How long does a temporary accidental last?
An accidental written beside a note lasts for the rest of that bar, at that pitch, and then expires at the bar line. The next bar returns to what the key signature specifies unless the accidental is written again.
What is the order of sharps and flats?
Sharps are added in the order F, C, G, D, A, E, B; flats follow the exact reverse, B, E, A, D, G, C, F. A key with three sharps affects the first three letters (F, C, G); a key with two flats affects the first two (B, E).