You are here:

Musical Composition, Theory and Songwriting/Determining the # of sharps or flats in a song


Hi Bill

How do I know how many sharps or flats are in a song I’m writing on the piano when I write it out by hand on sheet music? I'm getting confused because some notes I'm writing are accidentals. Meaning there a part of the song but are not mainly repeated sharp or flat notes like the others through out.



There can be a lot of technical detail that goes into explaining about key signatures and dealing with accidentals , but here is a brief explanation that should enable you to correctly determine keys and how to notate the accidentals.

To determine what key you're in (what should be in the key signature) and which accidentals should be indicated separately, you need to look in a specific order:
Think of  the phrase:  "Father Charles Goes Downstairs And Eats Beans...  or: f,c,g,d,a,e,b -- you'll always go in that order for sharps.

Look at the f-notes first  (in the melody AND  in the chords)  If most of them are sharp (e.g. in a D-major chord,  or a Bm chord, there is an f#), then that goes in the key signature.   If the F's are not sharp, then probably all other sharps would be indicated individually, or else you're in a flat key (see below).

After the F's, look at the C-notes (in melody and the chords, i.e., an A-major chord has a c# or a F#m has a c#)  If most of the c notes are sharp, then the key signature would have both the f# and the c#.  Next, look at the g's, then the D's  etc.

In general,
If there are no sharps or flats, then you're in the key of C
If 1 sharp (f#), then the key is G
If 2 sharps,  (f#, c#) then the key is D
If 3 sharps (f#,c#,g#) then the key is A
...and so on.  Most guitar-based songs will not exceed 4 sharps (Key of E)

For flats, the order to look at is BEAD ( b,  e,  a, d) -- followed by 'g'.
If most of the B's are flat, in the melody or the chords ( the chords Gm, Bb, Eb, etc all have a Bb note), then that goes in the key signature.
Then look at the e-notes.  If most are flat, then that goes in the key signature.
And so on for   a, d, g...

If the key signature has 1 flat (Bb) you're in the key of F
If 2 flats (Bb, Eb, then the key is Bb)
If 3 flats, (Bb, Eb, Ab), then the key is Eb
...and so on.

If there is an accidental in the melody (or a chord) that is not included in the key signature, then you notate it directly in the music.  For example, if your song has all the f's and c's sharp, but g's are natural, and there is an occasional d#, the key signature is f#, c# (key of D), and the d# notes would be marked directly in the music (that makes it easy for someone to see - and thus hear -  that those are outside the key).

Note that it is possible and not uncommon for a piece to change keys during the song.
This is very typical in a bridge section or in a modulated final verse.  If the key change lasts for many measures, then change the key signature in the music at that point.  If it only lasts a few measures, you can keep the same key signature and mark the accidentals directly in the music -- either is okay.  

Make sure you do not mix sharps and flats in a key signature.  If you had a piece with 5 sharps, they would be f,c,g,d,a.  You would not refer the the A# as a Bb, even though they are the same note    Similarly, if you are in a key with 5 flats (b,e,a,d,g,) you would not refer to the Gb as F# even though they are the same note.

Popular songs written for guitar are usually in sharp keys.  Song written for ensembles  where there are trumpets and saxophones (e,g, school bands) are usually written in flat keys, as those work best for those instruments.  Piano-based songs can end up in either sharp or flat keys, depending on the comfort of the pianist and the vocalist.

To fully understand scales and keys, you need to understand the Circle of Fifths.

Go here for my article on scales:

Go here for my diagram of the Circle of Fifths:

Go here for my article on chord-naming:

"Songcrafter's Coloring Book",  Chapter 26. Available on Amazon.

Good luck with your projects.

Musical Composition, Theory and Songwriting

All Answers

Answers by Expert:

Ask Experts


Bill Pere


Can answer questions on : Technical aspects of lyric and music compostion; How to give and receive objective critique; Arranging and production; Concrete vs abstract imagery; Use of metaphor; Rhyme techniques; Song Structure; Collaboration; Songwriter Associations; Promotion; Guitar technique; Music Business;


Grammy-Award-winning songwriter; President of the Connecticut Songwriters Association and Director of the Connecticut Songwriting Academy; Named one of the Top 50 Innovators and Guiding Lights of the Music Industry in 2008 by Music Connection Magazine; Author of "Songcrafters' Coloring Book:The Essential Guide to Effective and Successful Songwriting." Named Independent Artist of the Year,by the 2003 national Independent Music Conference; 30 years as a professional singer-songwriter; 16 original CD's released;
Have had songs placed on other artists' CD's. Twice named Connecticut Songwriter of the Year.
20 years as Executive Director of the LUNCH Ensemble. Have attended more than 200 presentations by top industry professionals and have critiqued thousands of songs. Have written and produced dozens of stage plays and hundreds of concert events; Have coached hundreds of aspiring songwriters, and collaborated with several award winning writers. Have written commissioned songs as an Official Connecticut State Troubadour. Music Director of youth choirs and music camps.

Connecticut Songwriters Association (President); LUNCH Ensemble (Local United Network to Combat Hunger -- Exec, Director); CMEA (Connecticut Music Educators Association); Folk Alliance; Association For Psychological Type; Songsalive; WE R Indie; Creative Songwriting Academy;

Songcrafters' Coloring Book: The Essential Guide to Effective and Succesful Songwriting Songwriters Market (2001, 2002); Connecticut Songsmith; Contemporary Songwriter Magazine; Songwriters Musepaper;
Songcrafter's Coloring Book;   Strategies for Teaching Guitar;

Masters Degree Molecular Biology; Certified MBTI Practitioner (Myers Briggs Type Indicator); Connecticut Secondary Public School Teaching Certificate; Author: "Songcrafters' Coloring Book: The Essential Guide to Effective and Successful Songwriting"

Awards and Honors
2012 Grammy; Named one of the Top 50 Innovators and Guiding Lights of the Music Industry in 2008 by Music Connection Magazine; Independent Artist of the Year, (2003 national Indie Conference); Official Connecticut State Troubadour, appointed by CT Commission on the Arts, 1995 ; 1982 and 1992 CT Songwriter of the Year; 2000 Award for 20 years of Outstanding Service to Songwriters;
2002 CSA Award for Outstanding Contribution to Education through Music; Numerous awards for outstanding community outreach through music; 1997 Citation from Connecticut Legislature for exemplary dedication to community outreach through music. 1995 Renaissance Award for multiple music achievements in a single year.   Invited Presenter and Mentor at various Music Conventions

©2017 All rights reserved.