The ICD-10 codes for insomnia are F51.01 (primary insomnia, a behavioral sleep disorder with medical, psychiatric, and substance causes ruled out) and G47.00 (insomnia, unspecified, in the neurological chapter). Use F51.01 when insomnia stands alone, and G47.00 when the cause is unclear or undocumented.
Quick Reference: Insomnia ICD-10 Codes
| Code | Description | Notes |
|---|---|---|
| F51.01 | Primary insomnia | Behavioral sleep disorder; medical, psychiatric, and substance causes ruled out |
| F51.02 | Adjustment insomnia | Acute, stress-related insomnia tied to an identifiable stressor |
| F51.05 | Insomnia due to other mental disorder | Insomnia coded as secondary to an underlying mental disorder |
| G47.00 | Insomnia, unspecified | Neurological chapter; cause unclear or undocumented |
F51.0 is a parent, not a billable code. The nonorganic insomnia family lives under F51.0, but you bill the specific fourth- and fifth-character code that matches the presentation, such as F51.01 (primary insomnia) or F51.02 (adjustment insomnia). The other F51.0x codes include F51.03 (paradoxical insomnia) and F51.04 (psychophysiologic insomnia).
F51.01 vs G47.00
The short answer: the two codes most therapists reach for are F51.01 (primary insomnia) and G47.00 (insomnia, unspecified). They sit in different chapters of ICD-10-CM, and that is the key to choosing correctly.
- F51.01 (primary insomnia) is a behavioral code in the psychiatric and behavioral chapter (the F codes). Use it when insomnia stands alone as a behavioral sleep disorder and you have ruled out medical, psychiatric, and substance causes. This is the code that best fits a client presenting with chronic difficulty initiating or maintaining sleep that is not explained by another condition.
- G47.00 (insomnia, unspecified) sits in the neurological chapter (the G codes), among the sleep disorders. Use it when the cause of the insomnia is unclear or has not yet been documented, for example at an early visit before you have characterized the presentation.
In short, reach for F51.01 when the picture is clearly primary behavioral insomnia, and G47.00 when specificity is not yet supported.
Billing note: F51.01 is the more specific behavioral code and is generally preferred when your assessment supports it. Treat G47.00 as the fallback for unclear or undocumented cases, and move to a specific code as soon as documentation supports it.
When Insomnia Is Secondary
Insomnia frequently rides along with depression and anxiety rather than standing on its own. When the sleep disturbance is driven by another mental disorder, the sequencing matters:
- Code the primary disorder first. If the insomnia is a symptom of major depression or an anxiety disorder, list that disorder, for example F32.x or F33.x for depression or F41.1 for generalized anxiety, as the primary diagnosis.
- Consider F51.05 for the insomnia itself. F51.05 (insomnia due to other mental disorder) is available when you need to code the sleep disturbance as secondary to an underlying mental disorder. Document how the insomnia relates to the primary condition.
Because F51.01 requires that psychiatric causes have been ruled out, it is not the right code when insomnia is clearly a feature of an underlying mental disorder. In that situation, the primary disorder plus F51.05 tells the more accurate story.
Watch the ruled-out requirement. F51.01 is specifically for primary insomnia with medical, psychiatric, and substance causes ruled out. If depression or anxiety is driving the sleep problem, do not default to F51.01; code the primary disorder and consider F51.05.
Documentation Tips
Strong insomnia documentation should include:
Sleep pattern: the specific difficulty (initiating sleep, maintaining sleep, or early-morning awakening), how many nights per week, and how long it has persisted.
Ruled-out causes: for F51.01, a brief note that medical, psychiatric, and substance causes have been considered and ruled out, which is what distinguishes primary insomnia from the alternatives.
Daytime impairment: the concrete functional impact of the poor sleep, such as fatigue, concentration problems, or mood effects, which supports medical necessity.
Relationship to other conditions: if depression or anxiety is present, a note on whether the insomnia is primary or secondary, which drives the choice between F51.01 and coding the primary disorder plus F51.05.
Treatment plan: the intervention addressing the sleep disturbance, for example CBT-I (cognitive behavioral therapy for insomnia), which supports billing for insomnia treatment.
Frequently Asked Questions
- What is the ICD-10 code for insomnia?
- The most common ICD-10-CM codes for insomnia are F51.01 (primary insomnia) and G47.00 (insomnia, unspecified). Use F51.01 when insomnia stands on its own as a behavioral sleep disorder with medical, psychiatric, and substance causes ruled out, and G47.00 when the cause is unclear or has not yet been documented.
- What is the difference between F51.01 and G47.00?
- F51.01 is the behavioral code for primary insomnia; it sits in the psychiatric chapter and requires that medical, psychiatric, and substance causes have been ruled out. G47.00 is the unspecified code in the neurological sleep-disorder chapter, used when the cause of the insomnia is unclear or undocumented. Choose F51.01 when the picture is clearly primary behavioral insomnia, and G47.00 when specificity is not yet supported.
- What is the code for insomnia due to anxiety or depression?
- When insomnia is driven by another mental disorder, code the primary disorder first, for example F32.x or F33.x for depression or F41.1 for generalized anxiety. F51.05 (insomnia due to other mental disorder) is available when you need to code the insomnia itself as secondary to a mental disorder. Document how the sleep disturbance relates to the underlying condition.
- Can therapists bill for insomnia treatment?
- Yes. With an appropriate insomnia code and documentation of medical necessity, therapists can bill for insomnia treatment such as CBT-I (cognitive behavioral therapy for insomnia). Support the claim with the insomnia diagnosis, the functional impairment, and the treatment plan addressing the sleep disturbance.
- What is adjustment insomnia?
- Adjustment insomnia is F51.02. It describes acute, stress-related insomnia tied to an identifiable stressor, and it typically resolves once the stressor eases or the person adapts. Use it when the sleep disturbance is short-term and clearly linked to a recent stressor rather than a chronic behavioral pattern.
Accurate insomnia coding comes down to the chapter split: F51.01 is the behavioral code for primary insomnia with other causes ruled out, and G47.00 is the neurological unspecified code for unclear cases. When another disorder is driving the sleep problem, code the primary disorder and consider F51.05.