Insomnia ICD-10 Code: G47.00, G47.01, F51.01 and Related Codes (2026)

Insomnia ICD-10 Code_ Complete Diagnosis Coding Guide

The ICD-10-CM code for insomnia, unspecified, is G47.00. Use G47.01 when a medical condition causes the insomnia, F51.01 for primary insomnia, F51.05 when another mental disorder causes it, and a substance code from F10 to F19 when alcohol or a drug is the cause.

Insomnia is one of the most common complaints in primary care, psychiatry and sleep medicine, and G47.00 is often picked by habit. It is the wrong choice once the provider has documented the type or the cause, and payers increasingly expect the more specific code.

This guide lists every insomnia code, shows how to choose between the G47 and F51 families, explains the excludes notes, and covers the documentation and billing points that keep claims clean. Patients with long-standing insomnia often report poor concentration too; our brain fog ICD-10 code guide covers those cognitive symptoms.

Key Takeaways

  • G47.00 is the code for insomnia with no type or cause documented. It is billable and can be listed first.
  • G47.01 is insomnia due to a medical condition. The medical condition is coded as well.
  • The F51.0- codes describe insomnia that is not due to a substance or a known physiological condition, including primary insomnia (F51.01) and insomnia due to another mental disorder (F51.05).
  • Alcohol- and drug-induced insomnia is not coded with G47 or F51. It is reported with the substance code that ends in 82, such as F10.982.
  • Acute and chronic insomnia share the same codes. Duration goes in the note, not in the code.

What Is the ICD-10 Code for Insomnia?

The ICD-10 code for insomnia with no further detail is G47.00, Insomnia, unspecified. It sits in Chapter 6, Diseases of the Nervous System, under category G47, Sleep disorders. The code has no versions for acute, chronic, sleep-onset or sleep-maintenance insomnia, so those details are recorded in the clinical note only.

G47.00 is appropriate when:

  • The provider documents insomnia, trouble falling asleep or trouble staying asleep and gives no cause.
  • The evaluation is still under way and no medical, psychiatric or substance cause has been identified.
  • The note does not name a specific type such as primary, adjustment or psychophysiologic insomnia.

Insomnia ICD-10 Codes at a Glance

Insomnia codes are split between two chapters. The table below lists each billable code and the documentation that supports it.

CodeDescriptionUse when the note shows
G47.00Insomnia, unspecifiedInsomnia with no type or cause stated
G47.01Insomnia due to medical conditionA named medical condition is causing the insomnia
G47.09Other insomniaA specified insomnia that has no code of its own
F51.01Primary insomniaInsomnia as its own disorder, with no medical, mental or substance cause
F51.02Adjustment insomniaShort-term insomnia tied to a stressor or life change
F51.03Paradoxical insomniaSleep state misperception; the patient sleeps more than reported
F51.04Psychophysiologic insomniaLearned, conditioned arousal around sleep
F51.05Insomnia due to other mental disorderAnxiety, depression or another mental disorder is the cause
F51.09Other insomnia not due to a substance or known physiological conditionAnother specified nonorganic insomnia
F10 to F19, ending in 82Substance use with substance-induced sleep disorderAlcohol, a stimulant, an opioid, a sedative or another drug is the cause
Z73.810 to Z73.819Behavioral insomnia of childhoodSleep-onset association, limit-setting or combined type in a child

G47 or F51: How Do You Choose?

The two families answer different questions. Category G47 holds sleep disorders classified as nervous system conditions. Subcategory F51.0 is titled insomnia not due to a substance or known physiological condition and sits in the mental and behavioral chapter. The provider’s documentation of the cause decides which family applies.

  1. Is a substance the cause? If alcohol or a drug is causing the insomnia, go to the F10 to F19 codes and stop.
  2. Is a medical condition the cause? If yes, report G47.01 and the medical condition.
  3. Is another mental disorder the cause? If yes, report F51.05 and the mental disorder.
  4. Is a specific insomnia type documented? Primary, adjustment, paradoxical and psychophysiologic insomnia each have an F51.0- code.
  5. None of the above? Report G47.00.

Do not report a G47.0- code and an F51.0- code for the same insomnia. Excludes2 notes under G47.0 point primary insomnia, insomnia due to a mental disorder and substance-related insomnia to their own codes. An Excludes2 note does allow two codes when a patient has two separate conditions, but one insomnia with one cause gets one insomnia code.

How Do You Code Insomnia Due to a Medical Condition?

Report G47.01 and also code the associated medical condition. The tabular list carries a code also note under G47.01, so a claim with G47.01 alone is incomplete. Which code goes first depends on the reason for the visit. If the visit is mainly about the sleep problem, G47.01 is listed first. If the visit is for the underlying condition and insomnia is addressed along the way, the condition leads.

Typical pairings are chronic pain (G89.29) with G47.01, and menopausal symptoms (N95.1) with G47.01. The provider has to link the two in the note. A problem list that shows both chronic pain and insomnia does not support G47.01 on its own; wording such as insomnia due to chronic pain does.

How Do You Code Insomnia With Anxiety or Depression?

When the provider documents that a mental disorder is causing the insomnia, report F51.05 and code the mental disorder too. Anxiety disorders and depressive disorders are the usual causes, and the full list of mental health diagnoses shows the codes that pair with it.

Two points cause most errors here. First, poor sleep is part of the diagnostic picture for depression and generalized anxiety. If the provider treats only the mood or anxiety disorder and mentions poor sleep as one of its symptoms, the insomnia is not coded separately. F51.05 is added when the insomnia is evaluated or treated in its own right. Second, behavioral health clinicians who diagnose insomnia disorder under DSM-5-TR generally report F51.01, while medical practices tend to stay in the G47 family. Either can be correct. The code has to match what the note says.

How Is Substance- or Medication-Induced Insomnia Coded?

Insomnia caused by alcohol or a drug is reported with a single combination code from F10 to F19. The code names the substance, the pattern of use and the sleep disorder together:

  • F10.182, F10.282 and F10.982: alcohol abuse, dependence or unspecified use with alcohol-induced sleep disorder.
  • F15.182, F15.282 and F15.982: other stimulant abuse, dependence or use with stimulant-induced sleep disorder. Category F15 includes caffeine and amphetamine-type stimulants.
  • F11.982 and F13.982: opioid or sedative, hypnotic or anxiolytic use with induced sleep disorder.
  • F19.982: other psychoactive substance use with substance-induced sleep disorder.

The note must name the substance and state whether the pattern is use, abuse or dependence. When a prescribed medicine taken as directed causes the insomnia, the adverse effect rule applies: code the insomnia the provider documents, followed by the T code for the drug with the adverse effect character. Query the provider if the record does not make the cause clear.

Is There a Different Code for Chronic Insomnia?

No. ICD-10-CM does not separate acute from chronic insomnia. Clinically, chronic insomnia means symptoms at least three nights a week for three months or longer, and that history matters for medical necessity, but it does not change the code. Two related codes are often confused with insomnia:

  • Z72.820, Sleep deprivation, is for a patient who is not getting enough sleep because of schedule or lifestyle. It is not an insomnia diagnosis.
  • Z73.810 to Z73.819, Behavioral insomnia of childhood, apply to children whose sleep problem is tied to sleep associations or limit setting.

What Documentation Supports an Insomnia Code?

Payers review sleep disorder claims against the note. A record that supports the code and the service contains:

  • The sleep complaint in specific terms: trouble falling asleep, trouble staying asleep or early waking.
  • Onset, frequency per week and duration.
  • Daytime effects such as fatigue, poor concentration or mood change.
  • The cause, if known, written as a link: due to chronic pain, due to generalized anxiety disorder, due to alcohol use.
  • Medications, caffeine and alcohol intake.
  • Treatments tried, including sleep hygiene, cognitive behavioral therapy for insomnia and medication.
  • The plan for this visit, which shows the condition was assessed or managed.

Billing Notes for Insomnia Claims

Office visits. Any insomnia code supports an evaluation and management visit when the note shows the problem was addressed. List the insomnia code first only when it is the main reason for the visit.

Sleep studies. Sleep studies such as polysomnography (95810, 95811) are ordered to look for sleep apnea, limb movement disorders and similar conditions. Many payer policies do not accept insomnia alone as the indication, so the order should carry the suspected condition or the symptoms that point to it, such as snoring or witnessed apneas.

Therapy. Cognitive behavioral therapy for insomnia delivered by a behavioral health clinician is billed with psychotherapy codes (90832, 90834, 90837) and is usually paired with an F51.0- diagnosis.

Annual updates. The ICD-10-CM code set changes every October 1. The insomnia codes have been stable, but confirm them against the current files each year.

Common Insomnia Coding Errors

ErrorWhat goes wrongFix
G47.00 on every chartDocumented type or cause is ignoredUse G47.01, an F51.0- code or a substance code when the note supports it
G47.01 aloneThe causing condition is missingAdd the medical condition code
G47.00 with F51.05Two insomnia codes for one problemReport F51.05 and the mental disorder only
G47.00 for alcohol-related insomniaWrong chapterReport F10.182, F10.282 or F10.982
Insomnia as the only diagnosis on a sleep studyMedical necessity denialReport the documented indication for the study

Insomnia Coding Examples

Example 1. A 45-year-old reports trouble falling asleep for six weeks. No cause is found and sleep hygiene is advised. Code: G47.00.

Example 2. A patient with chronic low back pain wakes several times a night because of the pain. The provider documents insomnia due to chronic pain. Codes: G47.01 and G89.29, sequenced by the reason for the visit.

Example 3. A psychiatrist documents generalized anxiety disorder with insomnia due to the anxiety and starts treatment for both. Codes: F41.1 and F51.05.

Example 4. A patient with alcohol dependence has alcohol-induced insomnia. Code: F10.282. No G47 or F51 code is added.

Example 5. A sleep specialist diagnoses psychophysiologic insomnia after a full evaluation and refers the patient for cognitive behavioral therapy. Code: F51.04.

Sleep and behavioral health claims being denied for diagnosis specificity or medical necessity? Steady Medical Billing reviews the coding against your documentation and shows you where claims are breaking. Request your free RCM audit.

Frequently Asked Questions

What is the ICD-10 code for insomnia?

G47.00, Insomnia, unspecified. It is used when the provider documents insomnia without a type or cause and is a billable code.

What is the ICD-10 code for chronic insomnia?

There is no separate code. Chronic and acute insomnia use the same codes, most often G47.00, G47.01 or F51.01. Document the duration in the note.

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

G47.00 is insomnia with no type or cause documented. F51.01 is primary insomnia, a documented disorder that is not due to a substance, a medical condition or another mental disorder.

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

F51.05, Insomnia due to other mental disorder, reported with the anxiety disorder code such as F41.1.

What is the ICD-10 code for insomnia due to a medical condition?

G47.01. The associated medical condition must also be coded.

Can G47.00 and F51.05 be billed together?

Not for the same insomnia, because that would describe one condition in two different ways. When a mental disorder is the cause, report F51.05 with the mental disorder code and leave G47.00 off.

What is the ICD-10 code for alcohol-induced insomnia?

F10.182 with alcohol abuse, F10.282 with alcohol dependence, or F10.982 with unspecified alcohol use. These combination codes replace the G47 and F51 insomnia codes.

Table of Contents

Schedule a Consultation