If you’ve ever had a fibromyalgia claim denied, received a payer query, or questioned whether you’re using the correct fibromyalgia ICD-10 code, this guide gives you exactly what you need.
We’ll review the ICD-10 code for fibromyalgia and every related code in its cluster: primary fibromyalgia syndrome, fibromyalgia with chronic pain, fibromyalgia unspecified, and history of fibromyalgia. No unnecessary theory. Only what applies in real-world practice today.
The ICD-10 Code for Fibromyalgia: M79.7
The correct ICD-10 code for fibromyalgia is M79.7. It is the only primary code assigned to this diagnosis. It includes primary fibromyalgia syndrome, fibromyalgia unspecified, and all confirmed fibromyalgia presentations. There are no subcodes. If a patient has a confirmed fibromyalgia diagnosis, M79.7 is the code reported on the claim.
What M79.7 is not: it is not shorthand for unexplained diffuse pain, not a placeholder while evaluating a patient, and not a substitute for localized muscle pain. Once you assign M79.7, you are confirming that the patient meets ACR 2016 diagnostic criteria: widespread pain across multiple body regions, symptoms lasting at least three months, and associated features such as fatigue or sleep disturbance. That confirmation must be supported in your documentation, and payers actively review for it.
Quick Fact
| Item | Detail |
| ICD-10 Code for Fibromyalgia Unspecified | M79.7 |
| Subcodes Available? | No |
| Coverage Scope | Applies to all confirmed fibromyalgia presentations |
Full Fibromyalgia ICD-10 Code Reference
Four codes are relevant in this category. Below is each code, when it applies, and the governing rule.
| ICD-10 Code | Description | When to Use | Key Rule |
| M79.7 | Fibromyalgia | Active, confirmed diagnosis — includes primary fibromyalgia syndrome and fibromyalgia unspecified | Sequence first when fibromyalgia is the reason for visit |
| M79.7 + G89.4 | Fibromyalgia with Chronic Pain | Add G89.4 second when documentation clearly states chronic, severe pain driving a pain management service | M79.7 always first. G89.4 never replaces it |
| M79.1 | Myofascial Pain Syndrome | Localized trigger point pain only — patient does NOT meet full ACR criteria | Do not substitute for M79.7 |
| Z87.39 | History of Fibromyalgia | Condition fully resolved and listed only as past history | Do not use if treatment is active today |
Primary Fibromyalgia Syndrome ICD-10: What Makes It Codeable
Widespread pain — documented specifically
Terms like “diffuse pain” or “pain everywhere” are not sufficient. Documentation must clearly reference multiple body regions. A reviewer should be able to independently confirm widespread pain from your note alone.
Duration of at least three months — clearly anchored
The phrase “chronic pain” does not establish duration. Include an onset date or clearly state symptoms have persisted beyond three months. This is a frequent audit gap.
The exclusion statement — often missing
ACR 2016 criteria require documentation that no other condition adequately explains the pain. A simple sentence such as:
“No alternative diagnosis adequately explains this patient’s pain pattern.”
This line is frequently reviewed first during audits. Make it routine.
Compliance Note
| Rule | Requirement |
| Outpatient Coding Standard | Unconfirmed diagnoses cannot be coded |
| Not Allowed | “Probable fibromyalgia” or “rule out fibromyalgia” coded as M79.7 |
| Temporary Code | Use M79.3 (pain, unspecified) until confirmed |
ICD-10 Code for Fibromyalgia with Chronic Pain: M79.7 + G89.4
When a confirmed fibromyalgia patient presents with severe, persistent chronic pain that directly drives a pain management service, G89.4 should be added as a secondary code. The correct sequencing is:
M79.7 first, G89.4 second.
G89.4 supports medical necessity for pain referrals, higher-complexity E/M services, and payer recognition of significant chronic pain burden. However, documentation must include:
- The explicit word “chronic”
- A severity descriptor (e.g., moderate to severe, functionally limiting, interfering with ADLs)
- A defined service driven by the chronic pain (referral, procedure authorization, complex prescription)
If these elements are absent, do not add G89.4. Unsupported secondary codes increase audit risk.
ICD-10 Code for Fibromyalgia Muscle Pain: M79.7 vs. M79.1
Correct coding depends entirely on whether pain is widespread or localized.
M79.7 — Widespread Pain
Multiple body regions involved, systemic features present (fatigue, sleep disturbance, cognitive issues), duration threshold met. This meets fibromyalgia criteria.
M79.1 — Localized Myofascial Pain
Pain limited to one or two muscle groups, such as upper trapezius or cervical paraspinals. No systemic features. ACR criteria not met. This is myofascial pain syndrome.
Both codes may appear on the same claim if clinically justified. Sequence based on the primary reason for the visit. They are not interchangeable.
History of Fibromyalgia ICD-10: When Z87.39 Applies
The history code for fibromyalgia is Z87.39 — Personal history of musculoskeletal disorders. It applies only when fibromyalgia is fully resolved and documented strictly as past medical history.
If you are actively managing fibromyalgia — prescribing medication, issuing referrals, or providing treatment — the condition is active and must be coded as M79.7.
A common error is listing fibromyalgia under Past Medical History while renewing duloxetine in the same encounter. Payers routinely flag this discrepancy.
The Contradiction Payers Flag Most
| Scenario | Correct Action |
| Fibromyalgia listed in Past Medical History + duloxetine renewal in Plan | Code M79.7 (active condition) |
| Using Z87.39 in this scenario | Likely payer query or denial |
Documentation Checklist: Before Assigning Any Fibromyalgia ICD-10 Code
Review this checklist prior to finalizing documentation.
| # | Confirm This Is in Your Note | Status |
| 1 | Widespread pain across multiple body regions clearly documented | ☐ |
| 2 | Symptom duration ≥ 3 months with clear onset reference | ☐ |
| 3 | Fatigue, sleep disruption, or cognitive symptoms noted | ☐ |
| 4 | Exclusion statement documented | ☐ |
| 5 | Diagnosis confirmed (not probable or rule out) | ☐ |
| 6 | If adding G89.4: word “chronic,” severity, and functional impact documented | ☐ |
| 7 | If using Z87.39: confirmed inactive and no related treatment today | ☐ |
| 8 | If coding M79.1: pain localized and ACR criteria not met | ☐ |
Six Things Every Clinician Should Know About Fibromyalgia ICD-10 Coding
- M79.7 is the only fibromyalgia code. It includes primary fibromyalgia syndrome and fibromyalgia unspecified. There are no subcodes.
- Documentation supports the code. If ACR criteria are not evident in the note, the code will not withstand audit.
- Include the exclusion statement. One sentence confirming no alternative diagnosis explains the pain is required.
- Chronic pain requires two codes when justified. Use M79.7 + G89.4 only when documentation supports it.
- Localized pain is coded M79.1. Regional trigger points without widespread distribution do not meet fibromyalgia criteria.
- Active treatment equals active diagnosis. If treatment appears in today’s plan, use M79.7 — not Z87.39.



