Water Hardness Calculator

Calculate water hardness from calcium and magnesium concentrations, or enter a lab-reported hardness value directly, to get its classification and the equivalent in grains per gallon.

mg/L
mg/L

Hardness bands

How it works

Water hardness is driven by dissolved calcium (Ca²⁺) and magnesium (Mg²⁺) ions, expressed as an equivalent concentration of calcium carbonate (CaCO₃):

Hardness (mg/L as CaCO₃) = 2.497 × Ca + 4.118 × Mg

where Ca and Mg are the calcium and magnesium concentrations in mg/L. If a lab already reports hardness directly (commonly as mg/L or ppm, which are effectively equal for dilute solutions like drinking water), use the "Enter hardness directly" option instead. Grains per gallon, the unit commonly used for water softener sizing, equals mg/L divided by 17.118.

Worked example

A supply with 31 mg/L calcium and 27 mg/L magnesium: hardness = 2.497 × 31 + 4.118 × 27 = 77.4 + 111.2 ≈ 188.6 mg/L as CaCO₃ — about 11.02 grains per gallon, which falls in the "Very hard" band (181+ mg/L).

Types of hardness

Hardness is sometimes split into two types, based on which minerals cause it:

Either way, persistently hard water can leave scale buildup in pipes, water heaters, and appliances, reducing their efficiency over time.

Assumptions

Reference

Hardness classification: USGS Water Science School.

Related tools

Frequently asked questions

How is water hardness calculated from calcium and magnesium?

Multiply calcium (mg/L) by 2.497, multiply magnesium (mg/L) by 4.118, and add the results to get hardness in mg/L as CaCO₃.

What counts as hard water?

Commonly, 121-180 mg/L as CaCO₃ is "hard," and above 180 mg/L is "very hard" (USGS classification).

How do I convert mg/L to grains per gallon?

Divide mg/L by 17.118 — useful when sizing a water softener that's rated in grains per gallon.

What's the difference between temporary and permanent hardness?

Temporary hardness (from bicarbonates) can be removed by boiling; permanent hardness (from sulfates/chlorides) needs ion-exchange softening instead.

Does this tell me if my water is safe to drink?

No — hardness measures dissolved minerals, not safety. Contact your water utility or a certified lab for quality testing.