Insomnia ICD-10 Codes: G47.00, G47.01, G47.09 and F51.0x

Is your practice leaking revenue? Find out exactly where.

Book a 15-minute operational audit with our team.

Table of Contents

Illustrated bed with a crescent moon and a small clock for an insomnia ICD-10 coding guide

The insomnia ICD-10 codes you can bill are G47.00 (unspecified), G47.01 (due to a medical condition) and G47.09 (other), plus the F51.0x family for insomnia not due to a substance or known physiological condition. G47.0 alone is a non-billable header. The provider's documented cause decides which code applies.

Older guides give G47.0 as the insomnia code and use G47.00 for “primary insomnia.” Both are wrong for the FY 2027 code set. This guide corrects those points, shows the two code families side by side, and explains what the Excludes2 notes allow. It is written for coders, billers and practice managers, not for patient care decisions.

Key takeaways

  • G47.0 is a non-billable category; use G47.00, G47.01 or G47.09.
  • Primary insomnia is F51.01. G47.00 is insomnia, unspecified.
  • Both insomnia families use Excludes2 notes, which allow two codes when both conditions are documented.
  • Only G47.8 and G47.9 of the nine G47 categories are billable as written.
  • Code the cause as the provider documented it, and query when it is unclear.

Which insomnia code applies: G47.0- or F51.0-?

The answer depends on what the provider documented as the cause. ICD-10-CM has two insomnia families. G47.0- sits in the nervous system chapter and covers insomnia that is unspecified, due to a medical condition, or otherwise described. F51.0- sits in the mental and behavioral chapter and covers insomnia not due to a substance or known physiological condition, with more specific types.

The category G47.0 on its own is not a valid code for a claim. In the FY 2027 code set (effective October 1, 2026 through September 30, 2027) it is a non-billable category that points you to G47.00, G47.01 or G47.09 (ICD-10-CM FY 2027 listing). A claim that carries only G47.0 is sending a header, not a diagnosis. Check the CMS ICD-10 page each October for the year in force.

Insomnia codes in ICD-10-CM, FY 2027: both families side by side
Code Title Chapter Choose it when the note says
G47.00 Insomnia, unspecified Nervous system Insomnia with no cause or type stated
G47.01 Insomnia due to medical condition Nervous system The provider links the insomnia to a medical condition
G47.09 Other insomnia Nervous system A specific type is stated that has no other code in this family
F51.01 Primary insomnia Mental and behavioral The provider documents primary insomnia
F51.02 Adjustment insomnia Mental and behavioral The provider documents adjustment insomnia
F51.03 Paradoxical insomnia Mental and behavioral The provider documents paradoxical insomnia
F51.04 Psychophysiologic insomnia Mental and behavioral The provider documents psychophysiologic insomnia
F51.05 Insomnia due to other mental disorder Mental and behavioral The provider links the insomnia to a mental disorder
F51.09 Other insomnia not due to a substance or known physiological condition Mental and behavioral Another non-substance type is stated

Source: ICD-10-CM FY 2027 code listings for G47.0 and F51.0 (icd-10codes.com); AAPC code reference for F51.0 (2026). Titles shortened in the last column; check the official Tabular.

G47.0 is a header, not a claim code

Billers who see G47.0 in an old superbill, a favorites list or an EHR template should have it replaced with one of the three valid fifth-character codes. Which one is a documentation question for the provider, not a guess for the front office.

How to pick between G47.00, G47.01, G47.09 and F51.0x

Start with the words in the note. Code what the provider documented, no more and no less. The FY 2027 Official Guidelines say an unspecified code is appropriate when it best reflects what is known at that encounter, and that it is inappropriate to pick a more specific code than the record supports (CMS, FY 2027 ICD-10-CM Official Guidelines).

Insomnia with no cause stated

G47.00, insomnia unspecified, is the honest code when the note says “insomnia” and nothing else. It is not a code for “primary insomnia.” Primary insomnia has its own code, F51.01. The old advice of using G47.00 for primary insomnia is wrong, and it is worth correcting in any internal cheat sheet.

Insomnia linked to a medical condition

G47.01 is for insomnia due to a medical condition, such as a documented pain or breathing condition. AAPC’s neurology coding coverage notes that G47.01 carries a note to also code the associated medical condition (AAPC, Neurology Coding Alert). The condition therefore needs its own code on the claim, and the note needs to state the link in the provider’s words.

Insomnia linked to a mental disorder

F51.05 is for insomnia due to another mental disorder. The mental disorder is reported with its own code. For help with those diagnoses, see the anxiety ICD-10 codes guide and the mental health ICD-10 codes guide.

Insomnia tied to alcohol or drugs

Alcohol-related insomnia and drug-related insomnia are not in G47.0 or F51.0 at all. The tabular points to the substance chapter, with alcohol-related insomnia at F10.182, F10.282 and F10.982 and drug-related codes under F11 through F19 (ICD-10-CM FY 2027, F51.0 notes). Which of these applies depends on the pattern of use the provider documents.

“A diagnosis code is only as specific as the sentence in the note that supports it. When the cause is unclear, the fix is a provider query, not a coder's best guess.”

Excludes2 notes: what they allow and what they do not

Both insomnia families carry Excludes2 notes, not Excludes1. That distinction changes the rule. An Excludes2 note means the listed condition is not part of the main one, and both codes may be reported together when the patient has both. An Excludes1 note means the two should not be reported together, with an exception for unrelated conditions (CMS, FY 2027 Guidelines, Section I.A.12).

In the FY 2027 tabular, the G47.0 note lists primary insomnia (F51.01), insomnia due to a mental disorder (F51.05) and the F51.0- family as Excludes2 entries, and the F51.0 note lists G47.0- the same way (G47.0; F51.0). The F51 category also lists organic sleep disorders in G47.- as Excludes2.

What the old advice got wrong

A common claim is that G47.00 and F51.05 “cannot be coded together” because of an Exclude note. The notes are Excludes2, which permit both codes when the record supports both. The practical test is whether the note describes two separate problems. Do not report a code pair just because the notes allow it, and do not drop one just because they sit in different chapters. Payers may apply their own edits, so check the rules of the plans you bill most.

A related point: sleep apnea sits in G47.3- and is listed as an Excludes2 entry under G47.0, so insomnia and sleep apnea are separate diagnoses when both are documented. Our obstructive sleep apnea ICD-10 code guide covers G47.33 and the rest of that family.

The rest of G47: which codes are headers and which are billable

Several rows in the old post’s G47 table are headers that need more characters. Of the nine G47 categories in FY 2027, only G47.8 and G47.9 are billable as written. The others must be taken to their further-specified codes (ICD-10-CM FY 2027, G47 listing).

G47 sleep disorder categories and where billable codes start (FY 2027)
Category Status as written Examples of billable codes beneath it
G47.0 Insomnia Non-billable header G47.00, G47.01, G47.09
G47.1 Hypersomnia Non-billable header G47.10 (unspecified), G47.14 (due to medical condition), G47.19 (other)
G47.2 Circadian rhythm sleep disorders Non-billable header G47.20 (unspecified type), G47.26 (shift work type)
G47.3 Sleep apnea Non-billable header G47.30 (unspecified), G47.33 (obstructive, adult and pediatric)
G47.4 Narcolepsy and cataplexy Non-billable header Further characters needed under G47.41 and G47.42, which are also headers
G47.5 Parasomnia Non-billable header G47.50 (unspecified), G47.52 (REM sleep behavior disorder)
G47.6 Sleep related movement disorders Non-billable header G47.61 (periodic limb movement disorder), G47.63 (sleep related bruxism)
G47.8 Other sleep disorders Billable as written G47.8
G47.9 Sleep disorder, unspecified Billable as written G47.9

Source: ICD-10-CM FY 2027 listings for G47 and G47.1 to G47.6 (icd-10codes.com). A “billable” flag does not guarantee payment.

G47.9 can look like a safe fallback, but it is a vague diagnosis, and unspecified diagnoses draw more payer attention. Use it only when the record truly cannot say more. Sleep apnea has its own caution: G47.3 carries Excludes1 notes for apnea NOS, Cheyne-Stokes breathing and pickwickian syndrome, so those are not reported with it (G47.3 notes).

What the note should say so the code holds up

A note that supports a precise insomnia code states the diagnosis, its suspected cause, and the plan. Without those, the coder is stuck choosing between G47.00 and a more specific code the record cannot support.

From the provider's wording to the code family
What the note documents Code family to review What to confirm before billing
“Insomnia” only, no cause G47.00 Whether the provider can add a cause or type at the next visit
Insomnia due to a named medical condition G47.01 plus the condition’s own code The link is stated, not implied
Insomnia due to a named mental disorder F51.05 plus the disorder’s own code The disorder is a current, documented diagnosis
A named type such as adjustment or psychophysiologic insomnia The matching F51.0x code The type word appears in the assessment
Insomnia related to alcohol or drug use F10 to F19 insomnia codes The documented pattern of use matches the code
Insomnia plus sleep apnea G47.0x and G47.3x together Both are assessed in the note

Source: ICD-10-CM FY 2027 notes for G47.0, F51.0 and G47.3 (icd-10codes.com); CMS FY 2027 Official Guidelines.

  • Cause stated in the assessment. “Insomnia due to chronic pain” supports G47.01. “Insomnia” alone supports G47.00.
  • Current diagnoses only. A history of anxiety is not the same as a current disorder that is causing the insomnia.
  • Medical necessity. Payer coverage for sleep testing such as polysomnography varies, and AAPC’s coverage advises documenting all symptoms to support necessity and later appeals (AAPC).
  • Dates of service and code year. Use the code set that applies to the date of service, not the date of entry.
Decision flow from provider note to the right insomnia ICD-10 code family
Read the cause in the note first; the code family follows. Source: RCM Finder.

Where insomnia codes cause billing problems

The usual billing risks with insomnia are invalid or vague codes rather than complicated rules. Three patterns are worth checking for.

  • Header codes on claims. G47.0 or another non-billable category is sent instead of a valid code. The claim may be rejected for an invalid diagnosis. Our CO-16 denial code guide explains denials for missing or invalid information.
  • Outdated templates. Old EHR templates keep favorites lists after the annual October update. Review diagnosis lists each fall.
  • Mixed-chapter pairs left unexplained. A G47 code with an F51 code, or an F-code with an underlying condition, can look like an error to a reviewer if the note does not show two separate problems.

A clean diagnosis is one input among many. See our clean claims guide for the full pre-submission checklist, and the CPT, ICD-10 and HCPCS code explainer for how diagnosis codes connect to procedure codes. Practices that want a second look can use medical billing services with coding support, and a periodic review like the one in our medical coding audits guide can surface header-code habits early.

F51.0- codes sit in the mental and behavioral chapter, so behavioral health practices should know them well. Coding rules for that setting are covered in our behavioral health coding cheat sheet, and our page on behavioral and mental health billing covers the specialty.

Want a second set of eyes on your diagnosis coding?

A free practice audit looks at how your claims carry diagnosis codes and where rejections start. No cost to ask.

Get a Free Practice Audit

What to re-check every October

Diagnosis code sets update every fiscal year. The FY 2027 set applies to encounters from October 1, 2026 through September 30, 2027 (CMS). Insomnia codes in the tables above are checked against that year. Confirm them in the official Tabular before updating internal tools, since the list can change.

Two insomnia ICD-10 code families, G47.0 and F51.0, and how each is reviewed
Two code families, one review habit: confirm the documented cause, then the code year. Source: RCM Finder.

Our recommendations

  1. Remove G47.0 from every template. Search EHR favorites, superbills and charge-entry lists for the header code and replace it with G47.00, G47.01 or G47.09.
  2. Teach one rule: code the cause the note states. Give coders a short rule: cause named, use the cause code; no cause, use unspecified; cause unclear, send a provider query.
  3. Correct the primary insomnia shortcut. Primary insomnia is F51.01. G47.00 is unspecified insomnia. Fix any cheat sheet that blurs the two.
  4. Read Excludes notes by type. Excludes2 permits both codes when both conditions are documented. Excludes1 does not. Mixing them up leads to dropped diagnoses or wrong pairs.
  5. Add the underlying condition code. G47.01 and F51.05 are reported with the code for the condition causing the insomnia, so make sure it appears in the note and on the claim.
  6. Review diagnosis lists each October. Set a calendar reminder to compare internal code lists with the new fiscal-year tabular.

Bottom line

Valid insomnia coding comes down to three habits: never send G47.0 alone, read Excludes notes by type, and code only the cause the note states. If your claims lean on unspecified codes or header codes, our denial management services team can trace where the rejections start, and the revenue calculator helps size the cost of rework.

Frequently asked questions

What is the ICD-10 code for insomnia?

There is no single code. G47.00 is insomnia, unspecified; G47.01 is insomnia due to a medical condition; G47.09 is other insomnia. F51.0- codes apply to insomnia not due to a substance or known physiological condition. G47.0 on its own is a non-billable category, so choose one of the specific codes based on the provider’s note.

Is G47.0 a billable code?

No. In the FY 2027 code set, G47.0 is a non-billable category and directs you to G47.00, G47.01 or G47.09. A claim that lists only G47.0 is using a header. Update templates and superbills so charge entry offers the valid codes instead.

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

G47.00 is insomnia, unspecified, used when the note gives no cause or type. F51.01 is primary insomnia, used when the provider documents primary insomnia. They are not interchangeable, and G47.00 is not a code for primary insomnia. The provider’s wording decides.

Can I report G47.00 and F51.05 together?

The tabular uses Excludes2 notes between these families, which means both codes may be reported when the patient has both conditions. The note must support two separate problems, and payers may apply their own edits. When the relationship is unclear, query the provider rather than choosing a pair.

What is the difference between Excludes1 and Excludes2?

Excludes1 means the two codes are not reported together, with an exception when the conditions are unrelated. Excludes2 means the listed condition is separate, and both codes may be reported when the patient has both. The FY 2027 Official Guidelines define each in Section I.A.12.

How do I code insomnia caused by alcohol or drugs?

These are not coded in G47.0 or F51.0. The tabular lists alcohol-related insomnia at F10.182, F10.282 and F10.982, and drug-related insomnia under F11 through F19. The correct code depends on the pattern of use the provider documents, so confirm it in the note.

Get your free practice audit

Tell us about your practice. We will contact you using the details you give.

  • A review of your recent claims, denials and A/R aging
  • Where your front desk and prior authorizations slow payment
  • A prioritized fix list you keep, whether or not you hire us

Pricing is quoted after the audit, based on your volume and the services you choose. Prefer to talk? Call +1 (302) 556-2288.

RCMFinder Master Intake Form

Sources

  1. ICD-10 Codes (CMS) — CMS (2026)
  2. FY 2027 ICD-10-CM Official Guidelines for Coding and Reporting — CMS / NCHS (2026)
  3. G47.0 Insomnia (ICD-10-CM FY 2027) — icd-10codes.com (2026)
  4. G47 Sleep disorders (ICD-10-CM FY 2027) — icd-10codes.com (2026)
  5. F51.0 Insomnia not due to a substance or known physiological condition — icd-10codes.com (2026)
  6. F51.0 reference — AAPC (2026)
  7. Sleep Disorder Coding Requires Nimble ICD-10-CM Navigation — AAPC (Neurology Coding Alert)
  8. G47.1 to G47.6 listings — icd-10codes.com (2026)

Disclaimer: This article is educational and is not coding, legal or compliance advice. ICD-10-CM codes change each fiscal year and payer rules vary. Confirm every code in the official Tabular and the payer's policy before billing. It does not offer clinical advice.

Awais Afzal, Healthcare Operations & Data Analyst

Awais has spent more than 16 years in healthcare digital marketing and clinical operations management. He builds data-driven revenue cycle blueprints for medical practices and leads product development of the RCM Finder portal. More about our team.

The RCM Finder portal, in seven pages
See how one portal runs your revenue cycle, from the visit to the payment.
The pain points it solves for practices and billing companies, what makes it different, screens from the portal and the reports ready on day one.
Picture of Awais Afzal

Awais Afzal

Awais Afzal is a healthcare entrepreneur and performance marketing specialist with over 16 years of experience in healthcare digital marketing and clinical operations management. As the driving force behind RCM Finder, Awais specializes in developing data-driven revenue cycle blueprints that help high-ticket medical practices scale operations and maximize cash flow.

Stop Leaving Money on the Table. Get Your Free RCM Audit.

Let our team of certified billing experts uncover the exact coding errors and workflow bottlenecks costing your practice thousands in hidden denials.