G47.00

G47.00: Insomnia, unspecified

The ICD-10-CM code for insomnia when the diagnosis is confirmed but the record does not specify whether it is primary, secondary or due to a particular cause.

Billable
FY2027

TABLE OF CONTENTS

Medical scribe app interface showing a recording waveform, a list of patient notes, and a SOAP note for John Doe.

Stop looking up codes.

Scribe auto-generates them for you.

Try Commure Scribe →

At a glance

Code Family

G47.0: Insomnia, within block G40–G47, episodic and paroxysmal disorders.

DRG Grouping

As a principal inpatient diagnosis, G47.00 groups to MS-DRG 887, Other Mental Disorder Diagnoses, in MDC 19, Mental Diseases and Disorders, under the FY2027 MS-DRG v44 grouper. When insomnia is documented as the principal reason for admission it is coded as the principal diagnosis.

HCC Mapping (v28)

None: G47.00 does not map to any CMS-HCC v28 category, and sleep disorders are not risk-adjusting conditions under the current CMS model.

Condition

Insomnia

Family Specificity

The G47.0 subcategory distinguishes insomnia by etiology: G47.00 when type and cause are not specified, G47.01 when a documented medical condition is the cause, and G47.09 for other insomnia types.

Which insomnia code do I assign?

G47.00 is the not-otherwise-specified code in the G47.0 subcategory, appropriate when documentation supports an insomnia diagnosis but does not differentiate the subtype. The subcategory is organized by etiology. The first question is always whether the record names a cause.

When documentation says…
Code
Insomnia directly caused by a documented medical condition
G47.01
Insomnia due to medical condition. The tabular instruction requires a Code Also for the underlying medical condition. The record must name that condition and link it to the insomnia.
Insomnia documented as primary, idiopathic or of nonorganic origin
F51.01
Primary insomnia. Consider this code when the documentation supports a nonorganic etiology rather than an organic one. The Index sends psychophysiologic insomnia to F51.04 instead.
An insomnia type that fits neither the unspecified nor the due-to-medical-condition code
G47.09
Other insomnia, which captures insomnia types not classifiable to G47.00 or G47.01.
Insomnia attributed to alcohol or drug use
F10.182 Alcohol abuse with alcohol-induced sleep disorder, or the matching substance-specific code. These codes are excluded from the G47.0 subcategory. The substance-related code is assigned rather than an insomnia code.
Sleep apnea rather than difficulty sleeping
G47.30 to G47.39
The sleep apnea codes. Sleep apnea is not coded as insomnia. Sleep apnea (G47.3-) is an Excludes2 note at G47.0, which permits reporting both codes when insomnia and sleep apnea are each documented.
A circadian rhythm sleep disorder
G47.2-
The circadian rhythm sleep disorder codes apply when the documented problem is the timing of sleep rather than the ability to initiate or maintain it.
Excessive sleepiness rather than difficulty sleeping
G47.10 to G47.19
Hypersomnia. Insomnia and hypersomnia are different conditions with separate code families and should not be conflated.
Insomnia confirmed, but neither the type nor the cause is stated
G47.00
The unspecified code. Correct when a provider documents insomnia as a confirmed diagnosis, such as difficulty initiating sleep, difficulty maintaining sleep or early-morning awakening, without attributing it to a specific medical or psychiatric comorbidity.

Tabular notes

EXCLUDES2: G47 PARENT LEVEL

Nightmares (F51.5), nonorganic sleep disorders (F51.-), sleep terrors (F51.4) and sleepwalking (F51.3). An Excludes2 note means the two conditions are not mutually exclusive. Where the insomnia is documented as nonorganic or not due to a substance or known physiological condition, an F51.0- code is the more appropriate choice.

EXCLUDES2: G47.0 SUBCATEGORY LEVEL

Alcohol related insomnia (F10.182, F10.282, F10.982), drug-related insomnia (F11.182 through F19.982, as listed in the note), idiopathic insomnia (F51.01), insomnia due to a mental disorder (F51.05), insomnia not due to a substance or known physiological condition (F51.0-), nonorganic insomnia (F51.0-), primary insomnia (F51.01) and sleep apnea (the G47.3 codes).

CODE ALSO: APPLIES TO G47.01, NOT TO G47.00

Where G47.01, insomnia due to medical condition, is used in place of G47.00, Code Also the underlying medical condition as the tabular instruction requires. That instruction does not attach to G47.00 itself.

FY2027 CODE CHANGES

No codes were added to or deleted from the G47.0 subcategory in FY2027. The FY2027 tabular addenda revise no note in category G47. G47.00 is unchanged in the FY2027 update.

Operational & financial impact

Why specificity matters beyond the chart: risk adjustment, DRG assignment and denial exposure all follow from which code is selected.

CMS-HCC v28 (PY2024+)

No HCC mapping applies to G47.00. The code does not map to any Hierarchical Condition Category in CMS-HCC Model Version 28, which is fully operative at 100% weight for Medicare Advantage payment year 2026. Sleep disorders are not risk-adjusting conditions under the current CMS model.

Medicare and commercial payers

There is no National Coverage Determination specific to G47.00. The code supports medical necessity documentation for sleep study referrals, pharmacological management and behavioral sleep medicine services, even though it generates no risk adjustment weight under CMS-HCC v28.

Documentation checklist to support G47.00

Chart elements that support code selection and reduce specificity-driven denials.

FAQ

When should G47.01 be used instead of G47.00?

Use G47.01 when the insomnia is directly caused by a documented medical condition. G47.01 carries a Code Also instruction. The underlying condition must be coded as well. G47.00 is reserved for records where the provider documents insomnia but does not specify its type or cause. Assigning G47.00 when the documentation actually names the cause is one of the most common errors with this code.

Does G47.00 generate any risk-adjustment weight?

No. G47.00 does not map to any Hierarchical Condition Category in CMS-HCC v28, which is fully operative at 100% weight for Medicare Advantage payment year 2026. Sleep disorders are not risk-adjusting conditions under the current CMS model. The code contributes nothing to a patient's risk score.

How is insomnia coded when the patient also has documented depression or anxiety?

Code the psychiatric condition first and add G47.00 as an additional code only if the insomnia is separately addressed at the encounter. The insomnia does not become the principal diagnosis simply because it is the symptom the patient reports most prominently.

Can G47.00 be assigned from a patient's report of poor sleep?

No. In the outpatient setting, code G47.00 only when insomnia is a confirmed diagnosis and is addressed at the encounter. Sleep disturbance symptoms should not be coded to G47.00 where no insomnia diagnosis is documented. In the inpatient setting, standard UHDDS uncertain diagnosis rules apply at discharge.

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

F51.01, primary insomnia, sits in category F51, sleep disorders not due to a substance or known physiological condition. The Index sends primary, idiopathic and nonorganic insomnia to F51.01 and psychophysiologic insomnia to F51.04. F51.01 appears in the Excludes2 entries at the G47.0 subcategory level, which means it is a separate condition rather than a more specific form of G47.00.

Is hypersomnia coded in the same family as insomnia?

No. Hypersomnia is classified to G47.10 through G47.19, a different code family from the G47.0 insomnia subcategory. They are distinct conditions.

Related codes

Codes in the same family as G47.00. Only codes with a published page render as links.

Sibling codes in the G47.0 family

  • G47.00: Insomnia, unspecified.
  • G47.01: Insomnia due to medical condition.
  • G47.09: Other insomnia.

Additional codes to consider

Codes outside the G47.0 family considered alongside G47.00.

Companion: code alongside when documented

No Code Also or Use Additional instruction attaches to G47.00 itself. When the provider documents the insomnia as due to depression, an anxiety disorder or another mental disorder, the Index directs it to F51.05, Insomnia due to other mental disorder, rather than G47.00. F51.05 carries a Code also note for the associated mental disorder.

Consider instead

  • G47.01: Insomnia due to medical condition. Use when a documented medical condition is the cause, with Code Also for that condition.
  • G47.09: Other insomnia. Use for insomnia types not classifiable to G47.00 or G47.01.
  • F51.01: Primary insomnia. Consider when the documentation states primary, idiopathic or nonorganic insomnia.
  • F51.05: Insomnia due to other mental disorder. Use when the provider links the insomnia to depression, an anxiety disorder or another mental disorder.
  • F51.09: Other insomnia not due to a substance or known physiological condition.
  • F10.182: Alcohol abuse with alcohol-induced sleep disorder. Excluded from G47.0 and used when the insomnia is alcohol-related.
  • G47.10: Hypersomnia, unspecified. A separate condition, not to be conflated with insomnia.
  • G47.30: Sleep apnea, unspecified. Assign a code from G47.30 to G47.39 for sleep apnea. The Excludes2 note at G47.0 permits reporting it with G47.00 when insomnia is also documented.
  • G47.2-: Circadian rhythm sleep disorders. Use when the documented problem is the timing of sleep.

Sources

All claims on this page derive from government and professional-standards sources.

Stop looking up codes. Scribe generates them for you.

Commure Scribe listens to your visit and auto-generates billing codes, no manual lookup.