ICD-10 Codes for Insomnia: G47.0 vs F51.0

Codes verified against the CMS FY2027 ICD-10-CM code descriptions (effective October 1, 2026; these codes are unchanged from FY2026). Reviewed . See sources.

What is the ICD-10 code for insomnia?

The ICD-10-CM code for insomnia, unspecified, is G47.00, where the Alphabetic Index sends "Insomnia." Insomnia not due to a substance or known physiological condition is coded in F51.0, such as F51.01 primary insomnia and F51.05 insomnia due to other mental disorder. Insomnia due to a medical condition is G47.01.

ICD-10-CM splits insomnia between two chapters. G47.0, in the nervous system chapter, covers insomnia without a documented cause (insomnia NOS), insomnia due to a medical condition, and other insomnia. F51.0, in the mental and behavioral chapter, covers insomnia not due to a substance or known physiological condition. The tabular list connects the two with Excludes2 notes in both directions.

This page lists the codes in both families with their official FY2027 descriptions, explains what the Excludes notes mean for choosing between them, and shows what a session note should contain so the diagnosis is supported. For the other sleep disorders in F51, see the mental health code reference.

Insomnia codes in G47.0 and F51.0

Insomnia codes in G47.0 and F51.0
CodeOfficial description (FY2027)BillableWhen it fits
G47.0InsomniaNo (header)Category only. Pick a billable code below.
G47.00Insomnia, unspecifiedYesInclusion term: insomnia NOS. The Index entry "Insomnia" points here.
G47.01Insomnia due to medical conditionYesCode also the associated medical condition.
G47.09Other insomniaYesThe Index lists "Insomnia, specified NEC" here.
F51.0Insomnia not due to a substance or known physiological conditionNo (header)Category only. Pick a billable code below.
F51.01Primary insomniaYesInclusion term: idiopathic insomnia.
F51.02Adjustment insomniaYesThe Index lists adjustment insomnia, stress-related insomnia and transient insomnia here.
F51.03Paradoxical insomniaYesDocumented paradoxical insomnia.
F51.04Psychophysiologic insomniaYesThe Index lists chronic and conditioned insomnia here.
F51.05Insomnia due to other mental disorderYesCode also the associated mental disorder.
F51.09Other insomnia not due to a substance or known physiological conditionYesThe Index lists specified insomnia not due to a substance or known physiological condition here.

How do I choose between G47.0 and F51.0?

Both categories carry Excludes2 notes that point at each other. Subcategory F51.0 excludes insomnia NOS (G47.0-), insomnia due to known physiological condition (G47.0-) and organic insomnia (G47.0-). Subcategory G47.0 excludes insomnia not due to a substance or known physiological condition (F51.0-), nonorganic insomnia (F51.0-), primary insomnia (F51.01), idiopathic insomnia (F51.01) and insomnia due to a mental disorder (F51.05).

The practical reading is that the documented cause drives the chapter. A record that says primary insomnia leads to F51.01. A record that says insomnia due to a medical condition leads to G47.01. A record that says only "insomnia," with no cause, leads to G47.00, because the Alphabetic Index lists "Insomnia (organic)" at G47.00 and the F51.0 note sends insomnia NOS back to G47.0-. The code follows what the clinician documented, not what is most common.

Sleep deprivation is a separate case. Z72.820, Sleep deprivation (inclusion term: lack of adequate sleep), is named in the F51.0 Excludes2 note, and Z72.820 itself has an Excludes1 note for insomnia (G47.0-), so the two are not reported together for the same condition unless they are unrelated.

What does the Alphabetic Index say about insomnia?

The FY2027 Index entries under "Insomnia" give a quick route from the documented wording to the code: adjustment, short-term, stress-related and transient insomnia go to F51.02; idiopathic, primary and nonorganic-origin insomnia go to F51.01; chronic, conditioned and psychophysiologic insomnia go to F51.04; paradoxical insomnia goes to F51.03; insomnia due to anxiety disorder, depression, mental disorder NEC, or psychiatric or psychopathology-related insomnia goes to F51.05; insomnia due to a medical condition goes to G47.01; and specified insomnia NEC goes to G47.09.

The Official Guidelines say to locate the term in the Index and then verify the code in the Tabular List (Section I.B.1). Use the Index entry as a starting point, then read the notes under the code before you finalize it.

What about insomnia caused by alcohol or drugs?

Both F51.0 and G47.0 carry Excludes2 notes for alcohol-related and drug-related insomnia. Those are coded in the substance-related categories as sleep disorders, such as the codes below. The F51.0 note lists the alcohol codes F10.182, F10.282 and F10.982 and a set of drug codes, and the G47.0 note lists the same.

Substance-induced sleep disorder codes named in the insomnia Excludes2 notes
CodeOfficial description (FY2027)BillableWhen it fits
F10.182Alcohol abuse with alcohol-induced sleep disorderYesAlcohol-related insomnia named in the F51.0 and G47.0 notes.
F10.282Alcohol dependence with alcohol-induced sleep disorderYesAlcohol-related insomnia named in the F51.0 and G47.0 notes.
F10.982Alcohol use, unspecified with alcohol-induced sleep disorderYesAlcohol-related insomnia named in the F51.0 and G47.0 notes.
F11.182Opioid abuse with opioid-induced sleep disorderYesOne of the drug-related insomnia codes named in the notes.
F13.182Sedative, hypnotic or anxiolytic abuse with sedative, hypnotic or anxiolytic-induced sleep disorderYesOne of the drug-related insomnia codes named in the notes.
F19.182Other psychoactive substance abuse with psychoactive substance-induced sleep disorderYesOne of the drug-related insomnia codes named in the notes.

Do the "code also" notes change what I report?

Two codes carry "code also" notes. F51.05, Insomnia due to other mental disorder, says to code also the associated mental disorder. G47.01, Insomnia due to medical condition, says to code also the associated medical condition. The Official Guidelines explain that a "code also" note means two codes may be required to fully describe a condition and that the note gives no sequencing direction (Section I.A.17).

So a client whose insomnia is documented as due to another mental disorder has an F51.05 code and a code for that disorder, for example an anxiety or depression code. Whether the insomnia is due to that disorder is the clinician's documented judgment, not something a coder infers.

How does the insomnia code connect to the CPT code?

The ICD-10-CM code says why the client is being seen; the CPT code says what service was provided. A 53 minute individual session where insomnia is the documented focus is reported as CPT 90837 with the insomnia code as a diagnosis. The diagnosis must be supported in the note for every date of service. Payer rules vary on which diagnoses they accept for which services, so confirm with the payer before billing.

What should the session note show?

  • The diagnosis in words as the treating clinician states it, including the cause if one is documented (for example "insomnia due to anxiety disorder" or "primary insomnia"). The cause is what separates F51.0 from G47.0.
  • The associated mental disorder or medical condition, when the insomnia is documented as due to it, so the "code also" note is supported.
  • Sleep complaints as the client reports them: difficulty falling asleep, staying asleep, early waking, and how many nights per week.
  • Functional impact on daytime functioning, mood, work or school.
  • Any sleep log, screening measure or tracking tool used, with the name and date.
  • The intervention used, the client's response, and progress toward a treatment plan goal.
  • Draft the session note in DAP or SOAP format so the sleep complaint, assessment and plan are easy to find.

Common mistakes

  • Reporting F51.0 or G47.0 without the fifth character. Both are subcategory headings, so the claim is invalid.
  • Choosing F51.01 for every insomnia record when the record documents only "insomnia." Insomnia NOS is G47.00.
  • Reporting F51.05 without a code for the associated mental disorder.
  • Reporting G47.01 without a code for the associated medical condition.
  • Using an insomnia code when the record documents alcohol-induced or drug-induced sleep disorder, which is coded in F10 to F19.
  • A diagnosis on the claim that never appears in the session note.

Frequently Asked Questions

What is the ICD-10 code for insomnia?

G47.00, Insomnia, unspecified, is the code for insomnia NOS. If the cause is documented, the code follows it: F51.01 for primary insomnia, F51.05 for insomnia due to other mental disorder, or G47.01 for insomnia due to a medical condition.

What is the difference between G47.00 and F51.01?

G47.00 is insomnia, unspecified (insomnia NOS). F51.01 is primary insomnia, with the inclusion term idiopathic insomnia. They sit in different chapters and the Excludes2 notes in both categories point at each other.

What is the ICD-10 code for insomnia due to anxiety?

F51.05, Insomnia due to other mental disorder. It has a "code also" note for the associated mental disorder, so the anxiety code is reported with it. The Alphabetic Index lists "Insomnia, due to, anxiety disorder" at F51.05.

What is the ICD-10 code for chronic insomnia?

The FY2027 Alphabetic Index lists "Insomnia, chronic" at F51.04, Psychophysiologic insomnia. Confirm the code in the tabular list and against the clinician's documented diagnosis.

Can F51.0 and G47.0 codes be reported together?

Both categories have Excludes2 notes for each other, which means the condition excluded is not part of the code but a client may have both. Choose the code that matches the cause the clinician documented.

Is F51.0 a billable code?

No. F51.0 is a subcategory heading. The billable codes are F51.01, F51.02, F51.03, F51.04, F51.05 and F51.09.

Did the insomnia codes change for FY2027?

No. The FY2027 addenda list no additions, deletions or description changes for G47.0 or F51.0. FY2027 took effect October 1, 2026.

Related references

Sources

Payer rules vary. Confirm diagnosis, coverage, modifier, and documentation rules with each payer before billing. This page is general education, not billing, coding, or legal advice. The diagnosis is the treating clinician's decision.

Draft the session note in SOAP, DAP, or BIRP

WellNotes drafts your session note from what you type or dictate. You choose the diagnosis and codes, and you review every note before it is used.

Stop spending evenings on documentation

WellNotes generates complete clinical notes in 2 minutes. Starting at $27/month.

Cancel anytime · Secure & private