Skip to content
FiftyCalc Free calculators for all 50 states

Water Hardness Calculator

Test cases replayed : 3 of 3 match · Methodology · No outside source listed

Enter the calcium and magnesium from your water test to get the total hardness, in mg/L as CaCO3 and in grains per gallon.

Result

Sample figures

Total hardness (mg/L as CaCO3)—

Total hardness (grains per US gallon) —

  • Total hardness (mmol/L)—
  • USGS hardness class—

Estimate for planning only, not tax, legal, financial or medical advice. This calculator uses the method explained on this page.

Water Hardness Calculator

Calcium, Ca, in mg/L: enter 0 or more. Prefilled example: 40.

Magnesium, Mg, in mg/L: enter 0 or more. Prefilled example: 10.

How to use this calculator

Fill in the fields in this order; each step takes you to its field.

  1. Calcium, Ca, in mg/L: enter 0 or more.
  2. Magnesium, Mg, in mg/L: enter 0 or more.
  3. Read the result: Total hardness (mg/L as CaCO3); the panel also shows Total hardness (grains per US gallon), Total hardness (mmol/L) and USGS hardness class.

How this calculator works

Hardness as CaCO3 = Ca × (100.086 ÷ 40.078) + Mg × (100.086 ÷ 24.305), that is about 2.497 × Ca + 4.118 × Mg, in mg/L. The molar masses of CaCO3 (100.086), Ca (40.078) and Mg (24.305) come from the CIAAW abridged standard atomic weights 2024 (ciaaw.org/abridged-atomic-weights.htm, read on 2026-10-27).

USGS classes: 0 to 60 mg/L soft, 61 to 120 moderately hard, 121 to 180 hard, more than 180 very hard (USGS Water Science School, Hardness of Water, usgs.gov, read on 2026-10-27).

1 grain = 64.79891 mg exactly (NIST SP 811, Appendix B.9, read on 2026-10-27) and 1 US gallon = 3.785411784 L, so 1 grain per gallon = 17.1181 mg/L.

The formula

  1. H=ca×100.08640.078+mg×100.08624.305
Symbols used in the formula
SymbolMeaningUnit
caCalcium, Camg/L
mgMagnesium, Mgmg/L
HTotal hardness (mg/L as CaCO3)

Worked example

Calcium, Ca40 mg/L
Magnesium, Mg10 mg/L
Total hardness (grains per US gallon)8.241
Total hardness (mmol/L)1.4095
USGS hardness classHard (121 to 180 mg/L)
  1. H=40×100.08640.078+10×100.08624.305=141.07

Total hardness (mg/L as CaCO3) 141.0704

Each step uses the unrounded value of the step before it; figures on this page are rounded for display.

Frequently asked questions

How hard is water with 40 mg/L calcium and 10 mg/L magnesium?

About 141.1 mg/L as CaCO3, or 8.24 grains per gallon: hard in the USGS classes.

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

Multiply by 17.1181. For example 10 grains per gallon is about 171.2 mg/L as CaCO3.

Related calculators