The ICD 10 code for hypomagnesemia is E83.42. It is a billable, five character code that sits inside the E83.4 family of magnesium metabolism disorders, and it remains valid in the FY 2027 code set that took effect on October 1, 2026. Report it when the provider documents hypomagnesemia as a diagnosis. A low magnesium number sitting alone in a lab report is not enough.
That last sentence is where most denials begin, so this guide spends real time on it.
Key takeaways
- E83.42 is the only ICD-10-CM code for hypomagnesemia in adults and children past the newborn period.
- Neonatal hypomagnesemia has its own code, P71.2.
- E61.2 (magnesium deficiency) is a dietary deficiency code. Do not use it as a shortcut for hypomagnesemia.
- Provider documentation, not the lab value, supports the diagnosis.
- When a drug caused the low magnesium, code the condition first and the adverse effect code second.
What Hypomagnesemia Means in Clinical Terms
Hypomagnesemia means the serum magnesium level has dropped below the lab’s reference range. Most labs set the normal range at roughly 1.7 to 2.2 mg/dL, though the exact limits vary by laboratory, so always go by the range printed on the report.
Magnesium quietly supports hundreds of enzyme reactions, nerve signaling, muscle contraction and heart rhythm. When it runs low, patients may notice cramps, tremor, weakness, tingling or fatigue. In more serious cases the picture includes seizures and dangerous arrhythmias. Low magnesium also makes potassium and calcium stubbornly hard to correct, which is why clinicians often check magnesium whenever a patient has refractory hypokalemia or hypocalcemia.
Common causes include long term use of proton pump inhibitors, loop and thiazide diuretics, heavy alcohol use, chronic diarrhea or malabsorption, poorly controlled diabetes, and certain drugs such as cisplatin. Some patients have inherited renal magnesium wasting, which is rare but real.
Why does a coder need to know this? Because the cause drives the second and third codes on the claim, and the cause is what a payer’s reviewer will look for when medical necessity is questioned.
ICD 10 Code for Hypomagnesemia: E83.42
E83.42 carries the official description “Hypomagnesemia.” It belongs to Chapter 4, Endocrine, Nutritional and Metabolic Diseases, under category E83, Disorders of Mineral Metabolism. The code is complete at five characters, so there is no sixth or seventh character to add.
The category E83 carries an Excludes1 note for dietary mineral deficiency (E58 to E61), parathyroid disorders (E20 to E21) and vitamin D deficiency (E55.-). An Excludes1 note means the two conditions are never reported together on the same claim. That single note settles one of the biggest points of confusion online, which we will get to in a moment.
Index terms such as primary hypomagnesemia and familial hypomagnesemia also lead to E83.42, so do not hunt for a separate code just because the provider wrote a more descriptive phrase.
Related Codes You Will Meet Alongside E83.42
| Code | Description | When it applies |
|---|---|---|
| E83.40 | Disorders of magnesium metabolism, unspecified | Provider documents a magnesium disorder without saying high or low |
| E83.41 | Hypermagnesemia | Elevated magnesium documented as a diagnosis |
| E83.42 | Hypomagnesemia | Low magnesium documented as a diagnosis |
| E83.49 | Other disorders of magnesium metabolism | A specified magnesium disorder that is not high or low |
| P71.2 | Neonatal hypomagnesemia | Newborn conditions, coded from the perinatal chapter |
| E83.51 | Hypocalcemia | Low calcium documented alongside low magnesium |
| E87.6 | Hypokalemia | Low potassium documented alongside low magnesium |
| E61.2 | Magnesium deficiency | Dietary deficiency only, not interchangeable with E83.42 |
Notice P71.2 in that table. Chapter 4 carries an Excludes1 note for transitory endocrine and metabolic disorders specific to the newborn (P70 to P74), so a newborn with low magnesium goes to the perinatal chapter, not E83.42. Pediatric and NICU billing teams trip over this more than they admit.
The E61.2 Mistake That Keeps Appearing Online
Several websites describe E61.2 as “the” ICD-10 code for hypomagnesemia and even call it the only code for magnesium deficiency. I have seen this kind of shortcut cost practices money for decades, because it looks reasonable and slips through basic edits.
Here is the distinction. E61.2 sits in the E58 to E61 range, which classifies dietary mineral deficiency. E83.42 classifies the metabolic finding of low serum magnesium. Because category E83 excludes the E58 to E61 range, using both on one claim is a conflict, and using E61.2 in place of E83.42 misrepresents what the provider documented.
If the provider specifically documents a nutritional or dietary magnesium deficiency, E61.2 can be correct. If the provider documents hypomagnesemia, which is what almost every clinical note says, the answer is E83.42. Let the provider’s words choose the code, not the search results.
When to Use E83.42
Use E83.42 when the provider documents hypomagnesemia as a diagnosis that was evaluated, monitored or treated during the encounter. Typical situations include:
- An emergency visit for palpitations or seizure where low magnesium is identified and treated
- An inpatient stay where IV magnesium replacement is ordered and the provider records hypomagnesemia in the progress notes
- An outpatient follow up for persistent low magnesium on oral supplements with repeat labs
- A documented link between low magnesium and another problem, such as refractory hypokalemia
In each case the note should say hypomagnesemia in plain words. If a nurse or a lab comment is the only place the term appears, the diagnosis is not codeable.
When Not to Use E83.42
The ICD-10-CM Official Guidelines for Coding and Reporting say abnormal findings from labs or imaging are not coded unless the provider indicates their clinical significance. A magnesium of 1.5 mg/dL on a routine panel, with no comment, no plan and no treatment, does not earn a diagnosis code.
Also avoid E83.42 in these situations:
- Uncertain diagnoses in the outpatient setting. Terms like “possible” or “rule out hypomagnesemia” are not coded on outpatient claims. Code the signs or symptoms that prompted the test instead.
- A more specific cause is the real reason for the visit. If the patient is being treated for a malabsorption disorder and low magnesium is only a passing lab finding, the underlying disease leads.
- The provider documented a dietary deficiency. That points toward the E58 to E61 range, and the two cannot be reported together.
Documentation That Actually Supports the Code
Weak documentation is the root of most electrolyte denials. Compare these two entries.
Weak: “Mg low. Continue to monitor.”
Strong: “Symptomatic hypomagnesemia, serum Mg 1.1 mg/dL on 11/03, with muscle cramps and persistent hypokalemia. Likely secondary to long term pantoprazole. IV magnesium sulfate given, repeat level in 48 hours, will review PPI need.”
The strong version names the diagnosis, gives the value and date, links the symptoms, states a suspected cause and records the treatment and plan. A reviewer can follow the story from start to finish, and a coder can assign every code with confidence.
When the note falls short, send a compliant query that asks the provider to clarify the clinical significance of the finding. Do not lead the provider toward a particular answer. Ask an open question and let the documentation speak.
Sequencing and Coding the Cause
Sequencing depends on why the patient was seen. If hypomagnesemia was the main reason for the visit or admission, E83.42 goes first. If another condition drove the encounter, report that first and add E83.42 as a secondary diagnosis when it was treated or monitored.
Here are three scenarios I see regularly.
Scenario 1: Drug induced hypomagnesemia. A patient on long term loop diuretics presents with cramps and is found to have low magnesium. The provider documents hypomagnesemia due to furosemide. Report E83.42 first, then the adverse effect code from the T50 range with the fifth or sixth character 5 for adverse effect. The same logic applies to a PPI, using the T47.1X5- adverse effect code, or to platinum chemotherapy. Always confirm the exact T code in your encoder, because the drug class decides it.
Scenario 2: Low magnesium with low potassium. The provider documents both and notes that potassium will not correct until magnesium is replaced. Report E83.42 and E87.6 together. Both were evaluated and both influenced treatment.
Scenario 3: Chronic kidney disease with electrolyte wasting. The kidney disease code leads when it is the primary reason for the visit, and E83.42 follows when the provider addresses the low magnesium. Nephrology groups see this pattern daily, and clean documentation matters a great deal for nephrology billing because electrolyte management is such a large share of what those practices do.
Services Often Billed With E83.42
The diagnosis code is only half of the claim. These are the services most often tied to it:
- CPT 83735 for the serum magnesium lab test
- HCPCS J3475 for magnesium sulfate injection, per 500 mg
- CPT 96365 and related infusion codes when IV magnesium is given in an outpatient or infusion setting
- The appropriate evaluation and management code for the visit
Point the diagnosis to the right line on the claim. The lab test, the drug and the infusion should each point to E83.42 or to whichever diagnosis best supports that specific service. Payers vary on how often they will cover repeat magnesium testing, so check the plan’s policy before you assume frequent labs will pay without question.
Common Denials and How to Fix Them
| Denial cause | What went wrong | Fix |
|---|---|---|
| Diagnosis not supported | Code assigned from a lab value alone | Obtain provider documentation of clinical significance |
| Medical necessity | Repeat magnesium tests without a documented reason | Document symptoms, treatment response or monitoring plan |
| Excludes1 conflict | E61.2 and E83.42 reported together | Remove the code that does not match the documentation |
| Wrong chapter for newborns | E83.42 used for a neonate | Use P71.2 when the provider documents neonatal hypomagnesemia |
| Diagnosis pointer error | Infusion or drug line points to an unrelated diagnosis | Re-link the service to the supporting diagnosis |
Most of these are preventable before the claim ever leaves your office. A strong denial management process catches the pattern early, and a few simple front end habits go a long way toward claim denials prevention across your whole electrolyte caseload.
What Changed in FY 2027
The FY 2027 ICD-10-CM code set took effect on October 1, 2026, and it applies to services provided through September 30, 2027. CMS published the update with 190 new codes, 30 deleted codes and four revised code descriptions. E83.42 remains a valid, billable code in the E83.4 family with the same description.
There is no grace period when a new code year begins. Outpatient and professional claims follow the date of service, and inpatient claims follow the date of discharge. If your billing system still carries last year’s code table, you will see rejections on other codes even when your hypomagnesemia claims are fine, so confirm that your encoder, your EHR and your clearinghouse all moved to the new set together. Reviewing the tabular list for any note changes in the E83 area each year takes only a few minutes and saves a lot of rework.
A Practical Coder Checklist
Before you release a claim carrying E83.42, run through these questions:
- Did the provider write “hypomagnesemia” in the note, not just a lab value?
- Is the serum magnesium level and date recorded?
- Is there a treatment, a monitoring plan or a clear clinical reason for the diagnosis?
- If a medication caused it, is the adverse effect code attached in the right order?
- Is E61.2 absent from the claim?
- For a newborn, did you use P71.2 instead?
- Does each billed service point to a diagnosis that supports it?
Teams that build this into their pre-bill review tend to see far fewer rejections, and it fits naturally into a broader routine for clean claims in medical billing.
Frequently Asked Questions
The ICD-10-CM code for hypomagnesemia is E83.42. It is billable and valid for FY 2027 claims.
Yes. E83.42 is a complete, specific code and can be reported on its own on a claim.
Only when the provider documents a dietary magnesium deficiency. For hypomagnesemia, use E83.42. The two should never be reported together because of the Excludes1 note under category E83.
P71.2. Newborn transitory metabolic disorders are classified in the perinatal chapter, not in E83.
No. The provider must document the diagnosis and its clinical significance. A lab value by itself is an abnormal finding, not a diagnosis.
Code E83.42 first, then the adverse effect code for the specific drug class from the poisoning and adverse effect table, with the fifth or sixth character 5.
Yes. When the provider documents both and both affected care, report E83.42 with E87.6.
Final Thoughts
Hypomagnesemia looks like a simple coding question, and the answer, E83.42, really is simple. The trouble comes from everything around it: documentation that never states the diagnosis, the E61.2 shortcut, missed newborn rules and drug cause sequencing that gets flipped. Get those four things right and this code will almost never come back to bother you.
If your team wants a second set of eyes on electrolyte coding, our certified specialists provide medical coding services that catch these problems before the claim goes out the door.
Stop Losing Revenue to Avoidable Coding Errors
Clainet RCM helps practices code accurately, submit cleaner claims and recover more of what they earn. Talk to our team about a free billing and coding review.
Book Your Free Consultation



