HomeLab, Chemistry & Measurement ToolsWater Hardness Calculator with Steps (Free) | StatsUnlock

Water Hardness Calculator with Steps (Free) | StatsUnlock

Water Hardness Calculator

Calculate the total hardness of water from calcium and magnesium or an EDTA titration, convert ppm, mg/L as CaCO₃, grains per gallon, °dH, °fH and mmol/L, find your water softener hardness setting, and split carbonate from non-carbonate hardness, with every step, a figure and four charts.

LabWater ChemistryStep by Stepppm as CaCO₃Grains per GallonEDTA TitrationWater SoftenerFree

⚡ 0. Quick Answer

A water hardness calculator uses total hardness (mg/L as CaCO₃) = 2.497 × Ca + 4.118 × Mg, with calcium and magnesium in mg/L. For Ca = 40 mg/L and Mg = 10 mg/L: 99.9 + 41.2 = 141.1 mg/L as CaCO₃ (141 ppm), which is 8.24 grains per gallon and 7.90 °dH: hard water on the USGS scale.

TH = 2.497 [Ca] + 4.118 [Mg]  ·  TH = V(EDTA) × M × 100,086 ÷ V(sample)  ·  gpg = ppm ÷ 17.1

Rule of thumb: under 60 mg/L (3.5 gpg) is soft; over 120 mg/L (7 gpg) is hard enough that a water softener is often worth considering. Set the softener to your hardness in grains per gallon, plus 4 for each ppm of iron.

⭐ Key Takeaways

  • A water hardness calculator turns Ca 40 and Mg 10 mg/L into 141.1 mg/L as CaCO₃ = 8.24 gpg = 7.90 °dH = 1.41 mmol/L.
  • EDTA titration: 12.5 mL of 0.01 M EDTA for a 50 mL sample is 250.2 mg/L as CaCO₃; each 1 mL is 20.02 mg/L.
  • 1 grain per gallon = 17.12 ppm; 1 °dH = 17.85 ppm; 1 °fH = 10 ppm; 1 mmol/L = 100.09 ppm.
  • Water softener setting = hardness in gpg + 4 × iron (ppm); 15 gpg with 1 ppm iron is 19 gpg.
  • Carbonate (temporary) hardness = the smaller of hardness and alkalinity; the rest is non-carbonate (permanent).

📚 1. What Is Water Hardness and How Is It Calculated?

Water hardness is the total of the dissolved divalent metal ions, almost entirely calcium (Ca²⁺) and magnesium (Mg²⁺), picked up as water passes through limestone, dolomite and gypsum. Because the two ions have different masses, hardness is reported as the mass of calcium carbonate that would contain the same number of ions: mg/L as CaCO₃, which equals ppm as CaCO₃. Hard water forms scale in kettles, pipes and water heaters and stops soap from lathering; it is not a health hazard, and reviews of drinking-water studies link magnesium-rich hard water with modestly lower cardiovascular mortality (Monarca et al., 2006). A water hardness calculator applies the conversion factors exactly, from ions, from a titration or from another unit.

A worked one-liner: TH = 2.497 × 40 + 4.118 × 10 = 99.9 + 41.2 = 141.1 mg/L as CaCO₃; ÷ 17.12 = 8.24 gpg; ÷ 17.85 = 7.90 °dH.

Who uses it: chemistry students doing the EDTA hardness practical; water and wastewater operators; well owners reading a lab report; homeowners setting a water softener or dishwasher; aquarium keepers converting °dH (GH); and engineers designing lime softening. One page replaces separate hardness, ppm to gpg and softener calculators.

Quick answers to the questions people ask most

How do you calculate the hardness of water?

Multiply calcium in mg/L by 2.497 and magnesium in mg/L by 4.118, then add them. The result is total hardness in mg/L as CaCO₃, the same number as ppm. For Ca 40 and Mg 10 mg/L, 99.9 + 41.2 gives 141.1 mg/L. Without ion data, titrate with EDTA instead.

How do you calculate hardness of water in ppm as CaCO₃?

Convert each ion to its CaCO₃ equivalent with the ratio of molar masses: 100.086 ÷ 40.078 = 2.497 for calcium and 100.086 ÷ 24.305 = 4.118 for magnesium. Add the two. Because 1 mg/L is 1 ppm in dilute water, 141.1 mg/L as CaCO₃ is 141.1 ppm as CaCO₃.

How is water hardness calculated from an EDTA titration?

EDTA binds calcium and magnesium one to one at pH 10. Total hardness = volume of EDTA (mL) × molarity × 100,086 ÷ sample volume (mL). For 12.5 mL of 0.01 M EDTA and a 50 mL sample: 12.5 × 0.01 × 100,086 ÷ 50 = 250.2 mg/L as CaCO₃. Subtract any reagent blank first.

How do you convert ppm to grains per gallon?

Divide ppm (mg/L as CaCO₃) by 17.12. One grain is 64.8 mg and one US gallon is 3.785 L, so 1 grain per gallon is 17.12 mg/L. For example, 200 ppm is 11.68 gpg and 10 gpg is 171.2 ppm. Water softeners in the US are set and rated in grains.

How do you calculate a water softener hardness setting?

Start with hardness in grains per gallon, then add 4 for each ppm of dissolved iron, and round up. Water at 15 gpg with 1 ppm iron needs a setting of 19 gpg. Capacity needed is people × about 75 gallons a day × that setting × days between regenerations.

What is the scale for soft and hard water?

The USGS classes are 0 to 60 mg/L soft, 61 to 120 moderately hard, 121 to 180 hard, and over 180 very hard. In grains per gallon, under 1 is soft, 3.5 to 7 moderately hard and over 10.5 very hard. Germany uses mmol/L: under 1.5 soft, over 2.5 hard.

Bench note from the StatsUnlock Team: the mistake we see most is mixing “mg/L of calcium” with “mg/L as CaCO₃”. A lab report that lists Ca = 40 mg/L does not mean the hardness is 40: as CaCO₃ it is 99.9 mg/L from calcium alone. The second is reading a TDS meter as hardness; total dissolved solids includes sodium, chloride and sulfate. How European countries regulate calcium, magnesium and hardness in drinking water is compared by Kožíšek (2020).
How a water hardness calculator turns calcium and magnesium into mg/L as CaCO3 40 milligrams per liter of calcium times 2.497 gives 99.9; 10 milligrams per liter of magnesium times 4.118 gives 41.2; together 141.1 milligrams per liter as calcium carbonate, which is hard water. Ca 40 mg/L Mg 10 mg/L × 2.497 =× 4.118 = 99.9 mg/L as CaCO₃ 41.2 Total 141.1 141.1 mg/L = 8.24 gpg = 7.90 °dH: hard (USGS 121 to 180)
Each ion is counted as the CaCO₃ it is equivalent to. Magnesium counts for more per milligram because it is lighter.
UnitEquals (mg/L as CaCO₃)Where you see itHeadline water
mg/L as CaCO₃ (ppm)1Lab reports, US utilities141.1
Grains per US gallon (gpg)17.12Water softeners, test strips8.24
German degree (°dH)17.85Europe, dishwashers, aquariums (GH)7.90
French degree (°fH)10France, Switzerland, Belgium14.11
English (Clark) degree (°e)14.25Older UK sources9.90
mmol/L100.09EU legislation, research1.41

🧮 2. Enter Your Water Data

Other divalent ions (optional, same units)

Enter the ion itself (Ca = 40 mg/L), not “Ca hardness as CaCO₃”. Leave optional fields blank if not measured.

📊 3. Results and Step-by-Step Working

Load a sample or enter your water data above, then press Calculate Hardness. The hardness in every unit, its class, the formula, every step, a figure, four charts and the exports will appear here.

🧠 4. Understanding Your Water Hardness Result, In Detail

4.1 What the result means

___

4.2 The formula

___

4.3 The detail that changes the answer

___

4.4 Context

___

4.5 What to do next

___

4.6 Why express hardness as CaCO₃?

Calcium (40.078 g/mol) and magnesium (24.305 g/mol) carry the same charge, so one millimole of either removes the same amount of soap and forms the same amount of scale. Adding their masses directly would undercount magnesium. Converting both to the mass of CaCO₃ (100.086 g/mol) that contains the same number of ions puts them on one scale: 1 mmol/L of hardness is always 100.09 mg/L as CaCO₃, whichever ion supplies it. The factors 2.497 and 4.118 come straight from the IUPAC atomic weights (Prohaska et al., 2022).

4.7 Temporary and permanent hardness

Hardness paired with bicarbonate is carbonate or temporary hardness: heating drives off CO₂ and deposits CaCO₃ as scale, which is why kettles fur up. Hardness paired with sulfate, chloride or nitrate is non-carbonate or permanent hardness and survives boiling. Because alkalinity is also reported as CaCO₃, the split is simply the smaller of the two numbers.

4.8 Hardness and health

Hardness is an aesthetic and engineering issue, not a contaminant, and WHO sets no health-based guideline value. Observational studies associate magnesium in drinking water with lower cardiovascular mortality (Catling et al., 2008; Jiang et al., 2016), and hard water is linked with eczema in infants (Perkin et al., 2016), although a randomized trial of household softeners found no clear benefit for children with eczema (Thomas et al., 2011).

✍ 5. How to Write Water Hardness in a Report: Detailed Results

A hardness value in a report needs the number, the unit and its basis (mg/L as CaCO₃, not just mg/L), the method (calculation from Ca and Mg, or EDTA titration) and, for measured values, the uncertainty. The seven write-ups below are filled from the water hardness calculator; they show the headline example until you press Calculate.

Showing the headline example (Ca 40 mg/L, Mg 10 mg/L). Press Calculate above to fill all seven write-ups with your own result.

5.1 Style rules

RuleWriteAvoid
State the basis141 mg/L as CaCO₃141 mg/L hardness
Name the methodby EDTA titration (Standard Methods 2340 C)hardness was measured
Give a second unit for mixed readers141 mg/L as CaCO₃ (8.2 gpg)8.24 gpg only, in a European report
Give the class with its scalehard (USGS)“hard” with no scale
Match decimals to the method250 ± 3 mg/L250.2154 mg/L
Keep ions and hardness apartCa 40 mg/L; Ca hardness 99.9 mg/L as CaCO₃“calcium 99.9 mg/L”

5.2 Seven ready-to-copy write-ups

1. Lab report or paper sentence
Total hardness was 141.1 mg/L as CaCO₃ (8.24 gpg; 7.90 °dH), calculated from calcium (40 mg/L) and magnesium (10 mg/L) as 2.497[Ca] + 4.118[Mg]; the water is hard.
2. Data sheet or log entry
Total hardness of water with Ca 40 and Mg 10 mg/L Total hardness: 141.1 mg/L CaCO₃ Calcium hardness: 99.89 mg/L CaCO₃ Magnesium hardness: 41.18 mg/L CaCO₃ Ca:Mg molar ratio: 2.43 grains per US gallon (gpg): 8.24 gpg German degree (°dH): 7.90 °dH French degree (°fH): 14.11 °fH English / Clark degree (°e): 9.90 °e millimoles per liter (mmol/L): 1.41 mmol/L milliequivalents per liter (meq/L): 2.82 meq/L USGS class (mg/L): Hard Water softener class (gpg): Hard Check: molar sum (Ca + Mg) = 1.4095 mmol/L; × 100.086 = 141.1 mg/L ✓
3. Code and spreadsheet formulas
Python: th = 2.497 * 40 + 4.118 * 10 R: th <- 2.497 * 40 + 4.118 * 10 Excel: =2.497*A2+4.118*B2 JavaScript: const th = 2.497 * 40 + 4.118 * 10;
4. Exam or homework answer, fully worked
Given: Ca 40 mg/L, Mg 10 mg/L Required: Total hardness as CaCO₃ Equation: TH = 2.497 [Ca] + 4.118 [Mg] (mg/L) Substitute: 2.497 × 40 + 4.118 × 10 Solve: 141.1 mg/L CaCO₃ Working: 1. Calcium hardness: 2.497 × 40 = 99.89 mg/L CaCO₃ 2. Magnesium hardness: 4.118 × 10 = 41.18 mg/L CaCO₃ 3. Total hardness: 99.89 + 41.18 = 141.1 mg/L CaCO₃ 4. Other units: 8.24 gpg · 7.90 °dH · 14.11 °fH · 9.90 °e · 1.41 mmol/L · 2.82 meq/L 5. Classify: USGS: Hard · softener scale: Hard · German: Soft (weich) 6. Check: molar sum (Ca + Mg) = 1.4095 mmol/L; × 100.086 = 141.1 mg/L ✓ Answer: 141.1 mg/L CaCO₃
5. Plain text for chat or a forum
Total hardness of water with Ca 40 and Mg 10 mg/L = 141.1 mg/L CaCO₃ (8.24 gpg · 7.90 °dH · 1.41 mmol/L · Hard).
6. Detailed results paragraph
Results. Total hardness of water with Ca 40 and Mg 10 mg/L = 141.1 mg/L CaCO₃. Calcium hardness 99.89 mg/L CaCO₃ + magnesium hardness 41.18 mg/L CaCO₃. Supporting values: Total hardness: 141.1 mg/L CaCO₃; Calcium hardness: 99.89 mg/L CaCO₃; Magnesium hardness: 41.18 mg/L CaCO₃; Ca:Mg molar ratio: 2.43; grains per US gallon (gpg): 8.24 gpg; German degree (°dH): 7.90 °dH; French degree (°fH): 14.11 °fH; English / Clark degree (°e): 9.90 °e; millimoles per liter (mmol/L): 1.41 mmol/L; milliequivalents per liter (meq/L): 2.82 meq/L; USGS class (mg/L): Hard; Water softener class (gpg): Hard. Check: molar sum (Ca + Mg) = 1.4095 mmol/L; × 100.086 = 141.1 mg/L ✓.
7. Results table (tab-separated, pastes into Excel or Word)
Quantity Value Note Total hardness 141.1 mg/L CaCO₃ as CaCO₃, = ppm Calcium hardness 99.89 mg/L CaCO₃ 70.8% of total Magnesium hardness 41.18 mg/L CaCO₃ 29.2% of total Ca:Mg molar ratio 2.43 often 2 to 5 in groundwater grains per US gallon (gpg) 8.24 gpg 1 gpg = 17.12 mg/L German degree (°dH) 7.90 °dH 1 °dH = 10 mg/L CaO = 17.85 mg/L French degree (°fH) 14.11 °fH 1 °fH = 10 mg/L CaCO₃ English / Clark degree (°e) 9.90 °e 1 °e = 14.25 mg/L millimoles per liter (mmol/L) 1.41 mmol/L 1 mmol/L = 100.09 mg/L milliequivalents per liter (meq/L) 2.82 meq/L 1 meq/L = 50.04 mg/L USGS class (mg/L) Hard 0–60 soft, 61–120 moderate, 121–180 hard, over 180 very hard Water softener class (gpg) Hard under 1, 1–3.5, 3.5–7, 7–10.5, over 10.5 gpg German class (mmol/L) Soft (weich) under 1.5, 1.5–2.5, over 2.5 mmol/L

∑ 6. What Is the Formula for Calculating Hardness of Water? All Formulas Used

①
Total hardness from calcium and magnesium
TH (mg/L as CaCO₃) = 2.497 [Ca] + 4.118 [Mg]
[Ca], [Mg]ion concentrations in mg/L (ppm)
2.497, 4.118100.086 ÷ 40.078 and 100.086 ÷ 24.305
ExampleCa 40, Mg 10: 99.9 + 41.2 = 141.1 mg/L
②
Any divalent ion
hardness of ion = mg/L × 100.086 ÷ molar mass  ·  from mmol/L: × 100.086  ·  from meq/L: × 50.043
FactorsSr 1.142 · Fe 1.792 · Mn 1.822 · Ba 0.729
③
EDTA titration
TH = (VEDTA − Vblank) × M × 100,086 ÷ Vsample
VmL; M in mol/L; 100,086 = mg CaCO₃ per mol × 1000 mL/L ÷ 1000
Example12.5 × 0.01 × 100,086 ÷ 50 = 250.2 mg/L
Ca, MgCa hardness from the pH 12 titration; Mg hardness = TH − Ca hardness
④
Unit conversion
1 gpg = 17.1185 mg/L  ·  1 °dH = 17.848  ·  1 °e = 14.254  ·  1 °fH = 10  ·  1 mmol/L = 100.086
Example200 ppm ÷ 17.1185 = 11.68 gpg; 15 °dH × 17.848 = 267.7 ppm
⑤
Water softener
setting = gpg + 4 × Fe (ppm)  ·  grains/day = people × gal/person × setting  ·  capacity = grains/day × days
Example15 gpg + 4 × 1 = 19; 4 × 75 × 19 = 5,700 grains/day; × 7 = 39,900 → 40,000-grain unit
⑥
Carbonate and non-carbonate hardness
CH = min(TH, Alk)  ·  NCH = TH − CH  ·  excess alkalinity = Alk − TH (if positive)
ExampleTH 250, Alk 180: CH 180, NCH 70 mg/L as CaCO₃
⑦
Uncertainty of the titration (JCGM 100:2008)
urel(TH) = √[(uV/V)² + (uM/M)² + (uVs/Vs)²]  ·  u = a/√3  ·  U = 2u
Example±0.05 mL, ±0.0001 M, ±0.05 mL ⇒ U ≈ ±3.1 mg/L on 250.2

🔀 7. How Do You Calculate Water Hardness? Flowchart, Step by Step

The same worked problem as Sections 0, 9, 10, 11 and 14: calcium 40 mg/L and magnesium 10 mg/L.

Start or resultData stepCalculation stepYes or no check
StartA water analysisCa 40 mg/L, Mg 10 mg/L
CheckAre the values the ions, in mg/L?
YesUse the factors directly.
Nommol/L × molar mass; or already “as CaCO₃”: just add.
1
Calcium hardness40 × 2.49799.9 mg/L as CaCO₃
2
Magnesium hardness10 × 4.11841.2 mg/L as CaCO₃
3
Total hardness99.9 + 41.2141.1 mg/L (ppm) as CaCO₃
4
Other units and class÷ 17.12 = 8.24 gpg; ÷ 17.85 = 7.90 °dH; USGS 121 to 180: hard
CheckDo the millimoles agree?
Yes40/40.078 + 10/24.305 = 1.409 mmol/L × 100.086 = 141.1. Verified.
NoA factor or unit slipped; recheck mg/L vs mmol/L.
Result141.1 mg/L as CaCO₃ = 8.24 gpgHard water; softener setting about 9 gpg

📝 8. How to Use This Water Hardness Calculator

  1. Pick what you want to calculate. Choose a mode in Section 2: hardness from calcium and magnesium, from an EDTA titration, a unit conversion, a water softener setting, or carbonate and non-carbonate hardness.
  2. Load a sample or type your values. Twelve worked problems are in the sample menu. Sample 1 is the headline problem. Nothing is calculated until you press Calculate Hardness.
  3. Check the units of your data. Calcium and magnesium can be in mg/L of the ion, mmol/L or meq/L. Values already reported as CaCO3 go in the converter instead.
  4. Add optional ions or alkalinity. Strontium, iron, manganese and barium count toward hardness; total alkalinity splits carbonate from non-carbonate hardness.
  5. For a titration, enter volumes and molarity. EDTA volume, its molarity and the sample volume; optionally a reagent blank, a calcium-only titration and glassware tolerances.
  6. For a softener, describe the household. Hardness, iron, number of people, gallons per person and days between regenerations; add your softener capacity to get its regeneration interval.
  7. Press Calculate Hardness. Press the button or Enter. The hardness in every unit, its class, a Verified badge, the formula and every step appear in Section 3.
  8. Read the figure and charts. The figure places your water on the USGS hardness scale; four charts show where the hardness comes from, its class, its units and its sensitivity.
  9. Copy the write-up. Section 5 fills seven ready texts for a report, a log, code, an exam, chat, a results paragraph and a table.
  10. Download or run a batch. Download Doc or PDF, or calculate many samples at once from a CSV of calcium and magnesium in the Batch tab.

📈 9. How to Calculate Water Hardness in Excel

Excel has no hardness function, but the formulas are one line each. The sheet repeats the headline problem (Ca 40 mg/L, Mg 10 mg/L), so the numbers match Sections 0, 7, 10, 11 and 14.

The whole thing in one cell: with Ca in A2 and Mg in B2, type =2.497*A2+4.118*B2. It returns 141.06 (141.07 with exact factors).

9.1 The formulas you need

You wantExcel formulaNote
Total hardness, mg/L as CaCO₃=2.497*A2+4.118*B2Standard Methods 2340 B
Exact factors=100.086*(A2/40.078+B2/24.305)141.07
Grains per gallon=E2/17.11858.24
German degrees=E2/17.8487.90 °dH
mmol/L=E2/100.0861.41
EDTA titration=(A2-B2)*C2*100086/D2V, blank, M, V(sample)
USGS class=IFS(E2<=60,"Soft",E2<=120,"Moderately hard",E2<=180,"Hard",TRUE,"Very hard")Excel 2019+
Softener setting=ROUNDUP(F2+4*G2,0)G2 = iron, ppm
Carbonate hardness=MIN(E2,H2)H2 = alkalinity as CaCO₃

9.2 Step by step

1 Enter the ions

Calcium in A2, magnesium in B2, in mg/L. Numbers only.

water-hardness.xlsxB2fx10AB1CaMg24010

A2 holds 40, B2 holds 10.

2 Calcium and magnesium hardness

In C2 type =A2*100.086/40.078; in D2 type =B2*100.086/24.305.

water-hardness.xlsxD2fx=B2*100.086/24.305ABCD1CaMgCa hard.Mg hard.2401099.8941.18

C2 shows 99.89; D2 shows 41.18.

3 Total hardness

In E2 type =C2+D2.

water-hardness.xlsxE2fx=C2+D2ABCDE1CaMgCa hard.Mg hard.TH2401099.8941.18141.07

E2 shows 141.07 mg/L as CaCO₃.

4 Grains per gallon

In F2 type =E2/17.1185.

water-hardness.xlsxF2fx=E2/17.1185ABCDEF1CaMgCa hard.Mg hard.THgpg2401099.8941.18141.078.24

F2 shows 8.24 gpg: hard water.

9.3 Many samples

Paste calcium and magnesium for every sample into columns A and B, select C2:F2 and fill down. Add the IFS formula in G to label each sample soft, moderately hard, hard or very hard.

9.4 Why Excel may differ from R or Python

SituationWhat happensFix
Rounded factors2.497 and 4.118 give 141.06; exact molar masses give 141.07Use one set of factors throughout
ROUNDExcel rounds half away from zero; R and Python round half to evenRound only the final value
Text in cells“40 mg/L” is text and gives #VALUE!Units in the header, numbers in the cells

9.5 Charting

Select columns C and D and insert a Stacked Bar chart to show calcium and magnesium hardness for each sample. Add vertical lines at 60, 120 and 180 for the USGS classes.

9.6 Errors you may see

  • #VALUE!: a unit typed into a number cell.
  • #DIV/0!: the sample volume cell is empty.
  • A hardness 2.5 times too high: the calcium value was already “as CaCO₃”.

📈 10. How to Calculate Water Hardness in R

A complete, copy-and-run script that reproduces the water hardness calculator for the headline problem. It calculates total hardness from calcium 40 mg/L and magnesium 10 mg/L, converts it to every unit, classifies it, works an EDTA titration with its uncertainty, sizes a water softener and saves one 300 dpi figure.

No packages needed. Base R covers every step.

10.1 The complete script

R, base only, saves water_hardness.png

# Water hardness calculator in base R (StatsUnlock)
M <- c(Ca = 40.078, Mg = 24.305, CaCO3 = 100.086, CaO = 56.077)
hardness <- function(ca, mg) {
  if (any(c(ca, mg) < 0)) stop("concentrations cannot be negative")
  M["CaCO3"] * (ca / M["Ca"] + mg / M["Mg"])          # mg/L as CaCO3
}
units <- c(gpg = 64.79891 / 3.785411784, dH = 10 * M[["CaCO3"]] / M[["CaO"]], fH = 10,
           e = 64.79891 / 4.54609, mmol = M[["CaCO3"]], meq = M[["CaCO3"]] / 2)
usgs <- function(th) cut(th, c(-Inf, 60, 120, 180, Inf),
                         labels = c("Soft", "Moderately hard", "Hard", "Very hard"))
# headline: Ca 40 mg/L, Mg 10 mg/L
ca <- 40; mg <- 10
th <- unname(hardness(ca, mg))
cat(sprintf("Ca hardness %.1f + Mg hardness %.1f = TH %.2f mg/L as CaCO3\n",
            2.497 * ca, 4.118 * mg, th))
print(round(th / units, 3))
cat("USGS class:", as.character(usgs(th)), "\n")
# EDTA titration: 12.5 mL of 0.01 M EDTA, 50 mL sample, tolerances a
v <- 12.5; m <- 0.01; vs <- 50
th_t <- v * m * 100086 / vs
urel <- sqrt((0.05 / sqrt(3) / v)^2 + (0.0001 / sqrt(3) / m)^2 + (0.05 / sqrt(3) / vs)^2)
cat(sprintf("EDTA: TH = %.1f +/- %.1f mg/L (U, k = 2)\n", th_t, 2 * urel * th_t))
# softener: 15 gpg, 1 ppm iron, 4 people x 75 gal, 7 days
setting <- 15 + 4 * 1; per_day <- 4 * 75 * setting
cat(sprintf("Softener setting %d gpg; %d grains/day; %d grains for 7 days\n",
            setting, per_day, per_day * 7))
png("water_hardness.png", width = 7, height = 4, units = "in", res = 300)
barplot(matrix(c(2.497 * ca, 4.118 * mg)), horiz = TRUE, col = c("#2563eb", "#0d9488"),
        xlim = c(0, 250), xlab = "mg/L as CaCO3", legend.text = c("Ca", "Mg"))
abline(v = c(60, 120, 180), lty = 2, col = "grey40")
invisible(dev.off())

10.2 Output

Ca hardness 99.9 + Mg hardness 41.2 = TH 141.07 mg/L as CaCO3
   gpg     dH     fH      e   mmol    meq 
 8.241  7.904 14.107  9.897  1.409  2.819 
USGS class: Hard 
EDTA: TH = 250.2 +/- 3.1 mg/L (U, k = 2)
Softener setting 19 gpg; 5700 grains/day; 39900 grains for 7 days

10.3 Traps

  • hardness() is vectorized: pass whole columns of a data frame.
  • cut() labels the USGS class; the intervals are closed on the right (60 is soft).
  • Use mg/L of the ion, not values already “as CaCO₃”.

10.4 What each part does

BlockPurpose
ConstantsIUPAC molar masses; factors 2.497 and 4.118 computed, not typed
hardness()Checks for negative values, then 100.086 × (Ca/40.078 + Mg/24.305)
Units and classDivides by each unit factor and applies the USGS classes
Middle blocksAn EDTA titration with its expanded uncertainty and a 7-day water softener sizing
Last blockStacked bar of calcium and magnesium hardness against the USGS class limits, saved at 300 dpi

10.5 Adapting it

Change ca and mg for your sample, or pass whole columns: the functions are vectorized and work on a data frame of many samples at once.

📈 11. How to Calculate Water Hardness in Python

A complete, copy-and-run script that reproduces the water hardness calculator for the headline problem. It calculates total hardness from calcium 40 mg/L and magnesium 10 mg/L, converts it to every unit, classifies it, works an EDTA titration with its uncertainty, sizes a water softener and saves one 300 dpi figure.

numpymatplotlib

Install once: pip install numpy matplotlib

11.1 The complete script

Python with NumPy and Matplotlib, saves water_hardness.png

# Water hardness calculator in Python (StatsUnlock)
import numpy as np
import matplotlib.pyplot as plt

M = {"Ca": 40.078, "Mg": 24.305, "CaCO3": 100.086, "CaO": 56.077}
UNITS = {"gpg": 64.79891 / 3.785411784, "dH": 10 * M["CaCO3"] / M["CaO"], "fH": 10.0,
         "e": 64.79891 / 4.54609, "mmol": M["CaCO3"], "meq": M["CaCO3"] / 2}

def hardness(ca, mg):
    """Total hardness, mg/L as CaCO3, from Ca and Mg in mg/L."""
    ca, mg = np.asarray(ca, float), np.asarray(mg, float)
    if (ca < 0).any() or (mg < 0).any():
        raise ValueError("concentrations cannot be negative")
    return M["CaCO3"] * (ca / M["Ca"] + mg / M["Mg"])

def usgs(th):
    return "Soft" if th <= 60 else "Moderately hard" if th <= 120 else "Hard" if th <= 180 else "Very hard"

ca, mg = 40, 10                                   # headline sample, mg/L
th = float(hardness(ca, mg))
print(f"Ca hardness {2.497 * ca:.1f} + Mg hardness {4.118 * mg:.1f} = TH {th:.2f} mg/L as CaCO3")
print({k: round(th / f, 3) for k, f in UNITS.items()})
print("USGS class:", usgs(th))

v, m, vs = 12.5, 0.01, 50                         # EDTA titration
th_t = v * m * 100086 / vs
urel = np.sqrt((0.05 / np.sqrt(3) / v) ** 2 + (0.0001 / np.sqrt(3) / m) ** 2 + (0.05 / np.sqrt(3) / vs) ** 2)
print(f"EDTA: TH = {th_t:.1f} +/- {2 * urel * th_t:.1f} mg/L (U, k = 2)")

setting = 15 + 4 * 1                              # softener: 15 gpg + 4 x 1 ppm iron
per_day = 4 * 75 * setting
print(f"Softener setting {setting} gpg; {per_day} grains/day; {per_day * 7} grains for 7 days")

fig, ax = plt.subplots(figsize=(7, 3))
ax.barh([0], [2.497 * ca], color="#2563eb", label="Ca")
ax.barh([0], [4.118 * mg], left=[2.497 * ca], color="#0d9488", label="Mg")
for x in (60, 120, 180):
    ax.axvline(x, ls="--", c="grey")
ax.set_xlim(0, 250); ax.set_yticks([]); ax.set_xlabel("mg/L as CaCO3"); ax.legend()
fig.tight_layout(); fig.savefig("water_hardness.png", dpi=300)

11.2 Output

Ca hardness 99.9 + Mg hardness 41.2 = TH 141.07 mg/L as CaCO3
{'gpg': 8.241, 'dH': 7.904, 'fH': 14.107, 'e': 9.897, 'mmol': 1.409, 'meq': 2.819}
USGS class: Hard
EDTA: TH = 250.2 +/- 3.1 mg/L (U, k = 2)
Softener setting 19 gpg; 5700 grains/day; 39900 grains for 7 days

11.3 Traps

  • hardness() accepts lists or arrays, so a pandas column works directly.
  • Use / not // so integer inputs are not truncated.
  • Raise an error for negative concentrations instead of returning a number.

11.4 What each part does

BlockPurpose
ConstantsIUPAC molar masses; factors 2.497 and 4.118 computed, not typed
hardness()Checks for negative values, then 100.086 × (Ca/40.078 + Mg/24.305)
Units and classDivides by each unit factor and applies the USGS classes
Middle blocksAn EDTA titration with its expanded uncertainty and a 7-day water softener sizing
Last blockStacked bar of calcium and magnesium hardness against the USGS class limits, saved at 300 dpi

11.5 Adapting it

Change ca and mg for your sample, or pass whole columns: the functions are vectorized and work on a data frame of many samples at once.

📋 12. Water Hardness Conversion Charts and Scales

12.1 Grains per gallon to ppm, °dH, °fH and mmol/L

gpgppm (mg/L CaCO₃)°dH°fHmmol/LUSGS class
117.10.961.710.17soft
234.21.923.420.34soft
351.42.885.140.51soft
3.559.93.365.990.60soft
468.53.846.850.68moderately hard
585.64.808.560.86moderately hard
6102.75.7510.271.03moderately hard
7119.86.7111.981.20moderately hard
8136.97.6713.691.37hard
9154.18.6315.411.54hard
10171.29.5917.121.71hard
10.5179.710.0717.971.80hard
12205.411.5120.542.05very hard
15256.814.3925.682.57very hard
20342.419.1834.243.42very hard
25428.023.9842.804.28very hard
30513.528.7751.355.13very hard

1 gpg = 64.79891 mg ÷ 3.785412 L = 17.1185 mg/L; 1 °dH = 17.848 mg/L. Exact. Last checked: October 2026.

12.2 ppm to grains per gallon chart

ppmgpgppmgpgppmgpg
00.0020011.6840023.37
251.4622513.1442524.83
502.9225014.6045026.29
754.3827516.0647527.75
1005.8430017.5350029.21
1257.3032518.9952530.67
1508.7635020.4555032.13
17510.2237521.9157533.59

gpg = ppm ÷ 17.1185. Last checked: October 2026.

12.3 Water hardness scales

ClassUSGS (mg/L CaCO₃)Softener industry (gpg)Germany (mmol/L)
Soft0 to 60under 1 (soft), 1 to 3.5 (slightly hard)under 1.5 (under 8.4 °dH)
Moderately hard / medium61 to 1203.5 to 71.5 to 2.5 (8.4 to 14 °dH)
Hard121 to 1807 to 10.5over 2.5 (over 14 °dH)
Very hardover 180over 10.5(no separate class)

USGS classes as used in US Geological Survey water-quality reports; softener classes as printed by the water treatment industry; German classes from the Washing and Cleaning Agents Act. Last checked: October 2026.

12.4 Hardness factors for each ion

IonMolar mass (g/mol)mg/L as CaCO₃ per mg/Lper mmol/Lper meq/L
Ca²⁺40.0782.4973100.08650.043
Mg²⁺24.3054.1179100.08650.043
Sr²⁺87.621.1423100.08650.043
Fe²⁺55.8451.7922100.08650.043
Mn²⁺54.9381.8218100.08650.043
Ba²⁺137.330.7288100.08650.043
Zn²⁺65.381.5308100.08650.043

Molar masses from the IUPAC standard atomic weights (Prohaska et al., 2022); CaCO₃ = 100.086 g/mol. Last checked: October 2026.

12.5 Water softener size by household and hardness

PeopleHardness (gpg)Grains per dayGrains for 7 daysSuggested size
153752,62516,000
1107505,25016,000
1151,1257,87516,000
1201,50010,50016,000
1251,87513,12516,000
257505,25016,000
2101,50010,50016,000
2152,25015,75016,000
2203,00021,00024,000
2253,75026,25032,000
351,1257,87516,000
3102,25015,75016,000
3153,37523,62524,000
3204,50031,50032,000
3255,62539,37540,000
451,50010,50016,000
4103,00021,00024,000
4154,50031,50032,000
4206,00042,00048,000
4257,50052,50064,000
551,87513,12516,000
5103,75026,25032,000
5155,62539,37540,000
5207,50052,50064,000
5259,37565,62580,000
652,25015,75016,000
6104,50031,50032,000
6156,75047,25048,000
6209,00063,00064,000
62511,25078,75080,000

75 US gallons per person per day; add 4 gpg per ppm of iron before using the table. Last checked: October 2026.

12.6 EDTA titration quick lookup (0.0100 M EDTA)

EDTA (mL)50 mL sample (mg/L CaCO₃)100 mL sample (mg/L CaCO₃)25 mL sample (mg/L CaCO₃)
120.010.040.0
240.020.080.1
360.130.0120.1
5100.150.0200.2
7.5150.175.1300.3
10200.2100.1400.3
12.5250.2125.1500.4
15300.3150.1600.5
20400.3200.2800.7
25500.4250.21,000.9

TH = V × 0.0100 × 100,086 ÷ V(sample); for 0.0200 M EDTA, double every value. Last checked: October 2026.

📈 13. Water Hardness Calculation Examples: Worked Problems

Eight worked problems that cover what a water hardness calculator meets: a textbook ion calculation, an EDTA practical, a utility report, a well-water softener, an aquarium, a European dishwasher, boiler scale and the classic mistake. Each number was checked in Python.

1
TEXTBOOK CASE

Ca 48 mg/L and Mg 24 mg/L

Two factors and a sum.

A water sample contains 48 mg/L of calcium and 24 mg/L of magnesium. Calculate the total hardness in ppm as CaCO₃.

Ca 48Mg 24× 2.497× 4.118218.7 ppm
QuantityValueNote
Calcium hardness119.9 mg/L48 × 2.497
Magnesium hardness98.8 mg/L24 × 4.118
Total hardness218.7 mg/L as CaCO₃12.78 gpg, very hard
Calcium and magnesium hardness119.9 mg/LCa98.80 mg/LMg218.7 mg/Ltotalmapping: bar height = mg/L as CaCO3
Magnesium is half the calcium by mass but 45% of the hardness.

What it means: Per milligram, magnesium adds 1.65 times as much hardness as calcium.

How to write it: "Total hardness was 218.7 mg/L as CaCO₃ (Ca 48 mg/L, Mg 24 mg/L)."

2
LAB PRACTICAL

EDTA titration with a calcium titration

pH 10, then pH 12.

A 50.0 mL sample needs 15.6 mL of 0.0100 M EDTA at pH 10 (Eriochrome Black T) and 10.4 mL at pH 12 (murexide).

15.6 mL0.0100 M50.0 mLTH 312.3Ca 208.2
QuantityValueNote
Total hardness312.3 mg/L15.6 × 0.01 × 100,086 ÷ 50
Calcium hardness208.2 mg/L10.4 mL
Magnesium hardness104.1 mg/Ldifference
Hardness from two titrations312.3 mg/Ltotal208.2 mg/Lcalcium104.1 mg/Lmagnesiummapping: bar height = mg/L as CaCO3
Each mL of 0.01 M EDTA is 20.02 mg/L.

What it means: Magnesium hardness is found by difference, so its uncertainty is the larger.

How to write it: "Total hardness 312.3 mg/L as CaCO₃ (Ca hardness 208.2, Mg hardness 104.1)."

3
UTILITY REPORT

180 ppm in grains per gallon

Divide by 17.12.

A city water report lists hardness as 180 ppm. The softener asks for grains per gallon.

180 ppm÷ 17.118510.52 gpgUSGS hardsoftener very hard
QuantityValueNote
Grains per gallon10.52 gpg180 ÷ 17.1185
German degrees10.09 °dH180 ÷ 17.848
Classeshard (USGS); very hard (softener scale)different limits
One water, two scales180.0 ppmUSGS limit180.0 ppmyoursmapping: bar height = ppm as CaCO3; 180 is the top of the USGS hard class
Exactly on a class boundary.

What it means: Always quote the number, not just the word.

How to write it: "Hardness 180 mg/L as CaCO₃ (10.52 gpg)."

4
WATER SOFTENER

25 gpg with 2 ppm iron, 5 people

Compensate, then size.

A family of five on a well with 25 gpg hardness and 2 ppm iron wants weekly regeneration.

25 gpg+ 4 × 2 Fesetting 3312,375/day96,000 grains
QuantityValueNote
Setting33 gpg25 + 4 × 2
Grains per day12,3755 × 75 × 33
7-day capacity86,625 grains→ 96,000-grain unit
Saltabout 26 lb/weekat 3,350 grains/lb
Grains per day9375 grainshardness3000 grainsironmapping: bar height = grains removed per day
Iron adds almost a third.

What it means: Above about 10 ppm iron, fit an iron filter first.

How to write it: "Softener set to 33 gpg; 96,000-grain unit for 7-day regeneration."

5
AQUARIUM

GH 8 °dH in ppm

German degrees.

An aquarium test kit reads general hardness (GH) of 8 °dH.

8 °dH× 17.848142.8 ppm8.34 gpgmoderately hard / hard
QuantityValueNote
ppm as CaCO₃142.88 × 17.848
mmol/L1.438 × 0.1783
USGS classhard
8 °dH in other units142.8 ppm14.28 °fH8.340 gpgmapping: bar height = value in each unit
One water, three numbers.

What it means: °dH is based on CaO, so 1 °dH is 1.785 °fH.

How to write it: "GH 8 °dH (142.8 mg/L as CaCO₃)."

6
DISHWASHER

2.8 mmol/L in °dH

A European utility unit.

A German utility reports 2.8 mmol/L. The dishwasher needs °dH.

2.8 mmol/L× 100.086280.2 ppm15.7 °dHhard (hart)
QuantityValueNote
mg/L as CaCO₃280.22.8 × 100.086
°dH15.7÷ 17.848, or 2.8 × 5.61
German classhard (over 2.5 mmol/L)
mmol/L against the German limits1.500 mmol/Lsoft limit2.500 mmol/Lmedium limit2.800 mmol/Lyoursmapping: bar height = mmol/L
Above the 2.5 mmol/L line.

What it means: 1 mmol/L = 5.61 °dH.

How to write it: "Hardness 2.8 mmol/L (15.7 °dH)."

7
SCALE AND BOILERS

TH 300 with alkalinity 120

Mostly permanent.

A process water has total hardness 300 mg/L and alkalinity 120 mg/L, both as CaCO₃.

TH 300Alk 120CH 120NCH 18060% permanent
QuantityValueNote
Carbonate hardness120 mg/Lmin(300, 120)
Non-carbonate hardness180 mg/L300 − 120
Excess alkalinity0alk below TH
Hardness split120.0 mg/Lcarbonate180.0 mg/Lnon-carbonatemapping: bar height = mg/L as CaCO3
Boiling removes only 120.

What it means: Lime softening alone will not soften this water; soda ash or ion exchange is needed.

How to write it: "Carbonate hardness 120 mg/L, non-carbonate hardness 180 mg/L (as CaCO₃)."

8
COMMON MISTAKE

Adding the ions

Ca + Mg is not hardness.

A student adds Ca 40 mg/L and Mg 10 mg/L and reports hardness as 50 mg/L.

40 + 10 = 50wrong basis2.497 × 404.118 × 10141.1
QuantityValueNote
Wrong50 mg/Lion masses added
Right141.1 mg/L as CaCO₃each ion as CaCO₃
Error−65%and the wrong class (soft vs hard)
Wrong vs right50.00 mg/Ladded ions (wrong)141.1 mg/Las CaCO3 (right)mapping: fuchsia bar = wrong method
The wrong sum says soft; the water is hard.

What it means: Always convert each ion to CaCO₃ before adding.

How to write it: "Total hardness 141.1 mg/L as CaCO₃, not 50 mg/L."

✏️ 14. How Do You Calculate Water Hardness by Hand and by EDTA Titration? Steps

The written method, calculator keys and the EDTA titration procedure, for the headline problem: Ca 40 mg/L and Mg 10 mg/L.

14.1 The written method

  1. Check the units. Ca and Mg in mg/L of the ion.
  2. Calcium hardness. 40 × 2.497 = 99.9 mg/L as CaCO₃.
  3. Magnesium hardness. 10 × 4.118 = 41.2 mg/L as CaCO₃.
  4. Add. 99.9 + 41.2 = 141.1 mg/L (ppm) as CaCO₃.
  5. Convert. 141.1 ÷ 17.12 = 8.24 gpg; ÷ 17.85 = 7.90 °dH.
  6. Check. 40/40.078 + 10/24.305 = 1.409 mmol/L × 100.086 = 141.1 ✓

14.2 On a calculator

StepKeysDisplay
Total hardness2.497×40+4.118×10=141.06
To gpgAns÷17.1185=8.24
EDTA12.5×0.01×100086÷50=250.215

14.3 Lab SOP: total hardness by EDTA titration (Standard Methods 2340 C)

Purpose

Determine total hardness of a water sample as mg/L CaCO₃.

Equipment and reagents

50 mL burette (Class A); 50 mL volumetric pipette; 250 mL conical flasks; 0.0100 M Na₂EDTA standardized against a CaCO₃ standard; ammonia buffer (pH 10); Eriochrome Black T indicator; distilled water.

Hazards and controls

Ammonia buffer is corrosive and irritating: use in a fume hood with goggles and gloves. EDTA is low hazard. Dispose of waste per local rules.

Procedure

  1. Pipette 50.0 mL of sample into a flask.
  2. Add 1 to 2 mL of buffer to reach pH 10.0 ± 0.1.
  3. Add 1 to 2 drops of Eriochrome Black T: the solution turns wine red.
  4. Titrate with EDTA, swirling, until the last reddish tinge turns pure blue. Finish within 5 minutes of adding buffer.
  5. Repeat until duplicates agree within 0.1 mL; titrate a distilled-water blank.
  6. TH = (V − Vblank) × M × 100,086 ÷ 50.

Record sheet

ItemValueUnit
Titrations12.50, 12.45, 12.55mL
Mean12.50mL
Blank0.00mL
Total hardness250.2 ± 3.1mg/L as CaCO₃

Acceptance criteria

Duplicates within 0.1 mL; a check standard within ± 5% of its value. These are teaching-lab criteria; follow your laboratory’s SOP where they differ.

Sources of error and their direction

  • Overshooting the endpoint: high.
  • No blank correction: high.
  • pH too low: fuzzy endpoint, usually high.
  • Iron, copper or aluminum present: endpoint blocked, high or no endpoint.
  • Unstandardized EDTA: either way.

14.4 Practice problems

1. Ca 60 mg/L, Mg 12 mg/L. Total hardness?

199.3 mg/L as CaCO₃

2. Convert 250 ppm to gpg.

14.60 gpg

3. Convert 12 gpg to ppm.

205.4 ppm

4. Convert 10 °dH to ppm.

178.5 ppm

5. 9.8 mL of 0.0100 M EDTA for a 50 mL sample. Hardness?

196.2 mg/L

6. Ca 1.5 mmol/L and Mg 0.6 mmol/L. Hardness in mg/L?

210.2 mg/L

7. 20 gpg and 0.5 ppm iron. Softener setting?

22 gpg

8. 3 people, 12 gpg, 75 gal each. Grains per day?

2,700 grains

9. TH 200, alkalinity 260. Carbonate and non-carbonate?

CH 200, NCH 0, excess alkalinity 60

10. Classify 95 mg/L on the USGS scale.

moderately hard

14.5 Mistakes that lose marks

  • Adding the ion masses instead of their CaCO₃ equivalents.
  • Forgetting “as CaCO₃” in the unit.
  • Using mL instead of L for the sample volume.
  • Leaving out the blank.
  • Confusing °dH and °fH.
  • Classifying without naming the scale.

14.6 Check-yourself and lab questions

Check: Why multiply calcium by 2.497?

100.086 ÷ 40.078: it expresses the calcium as the CaCO₃ with the same number of ions.

Check: Why does magnesium have a larger factor than calcium?

It is lighter (24.3 g/mol), so each milligram contains more ions.

Check: How many ppm is 1 gpg?

17.12 ppm.

Check: What does carbonate hardness depend on?

The smaller of total hardness and alkalinity.

Lab: Why buffer the titration at pH 10?

EDTA binds Ca and Mg strongly and Eriochrome Black T changes color sharply there.

Lab: Why does the pH 12 titration give calcium only?

Magnesium precipitates as Mg(OH)₂ and does not react.

Lab: Why run a reagent blank?

Trace hardness in the buffer and water would otherwise be counted.

Lab: Duplicate titrations differ by 0.3 mL. What next?

Repeat: they should agree within about 0.1 mL.

✅ 15. Which Hardness Method and Unit Should You Use?

SituationUseCalculator modeExample
A lab report lists Ca and Mg2.497 Ca + 4.118 MgCalcium and magnesiumCa 40, Mg 10 → 141.1 mg/L
Chemistry practical, titrationEDTA, Eriochrome Black TEDTA titration12.5 mL, 0.01 M, 50 mL → 250.2 mg/L
A test strip or utility report in another unitUnit conversionConvert units200 ppm = 11.68 gpg
Setting or buying a water softenerGrains per gallonWater softener15 gpg + 1 ppm iron → 19 gpg
Scale, boilers, lime softeningCarbonate splitCarbonate hardnessTH 250, Alk 180 → NCH 70
Aquarium GH or a European dishwasher°dH or mmol/LConvert units8 °dH = 142.8 mg/L
Calculate from ions when
  • You have ICP or AAS results for Ca and Mg.
  • You want calcium and magnesium hardness separately.
  • You want to include Sr, Fe or Mn.
Titrate when
  • No instrument data is available.
  • You need a quick routine check (Standard Methods 2340 C).
  • Teaching complexometric titration (Yappert & DuPré, 1997).

🔧 16. Common Water Hardness Calculation Mistakes

Almost every wrong hardness value comes from a unit basis, a factor or the titration endpoint. The water hardness calculator guards against each one below.

SymptomCauseFix
Hardness equals Ca + Mg (50 mg/L)Added ion masses without the factors2.497 Ca + 4.118 Mg = 141.1 mg/L
Hardness far too highMultiplied a value already “as CaCO₃” by 2.497Check the basis on the report
Answer 1000 times offMixed mmol/L and mg/L, or mL and LChoose the right unit in the calculator
Titration result too highNo reagent blank, or overshot endpointSubtract the blank; add EDTA dropwise near blue
Endpoint fades or never turns bluepH not 10, or Fe, Cu or Al interferesFresh buffer; add cyanide-free masking agent per method
Calcium titration greater than totalMurexide endpoint read late, or pH below 12pH 12 to 13 so Mg(OH)₂ precipitates
Softener lets hard water throughSetting ignores iron or is below true hardnessAdd 4 gpg per ppm iron; retest
TDS meter used as hardnessTDS includes Na, Cl, SO₄Use a hardness test or Ca and Mg
°dH treated as mg/L ÷ 10Confused °dH with °fH1 °dH = 17.85 mg/L; 1 °fH = 10 mg/L
Excel gives a hardness of 0Numbers stored as text (“40 mg/L”)Numbers only in the cell

⚠️ 17. Assumptions and Limitations

AssumptionHow to checkIf it fails
Ca and Mg carry nearly all hardnessSr, Fe, Mn, Ba usually under 5%Enter the other ions
Ion values are dissolved, in mg/LLab report units and filtrationChoose mmol/L or meq/L
EDTA reacts 1:1 at pH 10Buffer pH, standardized EDTARestandardize; check the buffer
Tolerances are rectangularClass A glassware tolerancesUse your own tolerances; add endpoint repeatability
Softener rule: + 4 gpg per ppm ironSoftener manualUse the manufacturer’s factor; above about 10 ppm, use an iron filter
75 gallons per person per dayWater billsEnter your own daily use
Alkalinity is bicarbonatepH below about 8.3At higher pH, split carbonate and hydroxide alkalinity first

Hardness is not regulated as a health contaminant in the US; several EU countries set minimum or recommended calcium and magnesium levels (Kožíšek, 2020). This calculator gives chemistry and softener sizing, not medical or engineering certification.

🎯 18. Conclusion

Your result

The water hardness calculator gives 141.1 mg/L CaCO₃ (8.24 gpg, 7.90 °dH): hard water. Hardness = 2.497 Ca + 4.118 Mg, in mg/L as CaCO₃.

What the water hardness calculator does

Water hardness is one idea, divalent metal ions counted as CaCO₃, reported in half a dozen units and measured in two main ways. This water hardness calculator works from calcium and magnesium or an EDTA titration, converts between ppm, gpg, °dH, °fH, °e and mmol/L, sizes and sets a water softener, and splits carbonate from non-carbonate hardness, with every step shown.

Watch out for

  • mg/L of the ion is not mg/L as CaCO₃.
  • Subtract the titration blank.
  • 1 gpg = 17.12 ppm, not 17.
  • Add iron to the softener setting.
  • Name the class’s scale.

Next steps

To make EDTA and calcium standards, use the molarity calculator and dilution calculator; for brine strength, the specific gravity calculator. Whatever the unit, start and finish with the water hardness calculator.

❓ 19. Frequently Asked Questions

Q1. How do you calculate the hardness of water?

Multiply the calcium concentration in mg/L by 2.497 and the magnesium concentration in mg/L by 4.118, then add the two results. The total is hardness in mg/L as CaCO3, which is the same number as ppm as CaCO3. For calcium 40 mg/L and magnesium 10 mg/L, 99.9 + 41.2 gives 141.1 mg/L, which is hard water.

Q2. What is the formula for calculating hardness of water?

Total hardness (mg/L as CaCO3) = 2.497 × Ca + 4.118 × Mg, with both ions in mg/L. This is the calculation method in Standard Methods 2340 B. The factors are the molar mass of calcium carbonate, 100.086, divided by 40.078 for calcium and 24.305 for magnesium, so each ion is counted as the CaCO3 it equals.

Q3. How do you calculate hardness of water in ppm as CaCO3?

Work out the hardness in mg/L as CaCO3 with 2.497 × Ca + 4.118 × Mg, then read it as ppm, because 1 mg/L equals 1 ppm in fresh water. If your data are in mmol/L, add calcium and magnesium in mmol/L and multiply by 100.086. For 1.2 and 0.4 mmol/L, 1.6 × 100.086 = 160.1 ppm as CaCO3.

Q4. How do you calculate total hardness from an EDTA titration?

Total hardness = volume of EDTA in mL × EDTA molarity × 100,086 ÷ sample volume in mL. EDTA reacts one to one with calcium and magnesium at pH 10 with Eriochrome Black T. For 12.5 mL of 0.01 M EDTA and a 50 mL sample, 12.5 × 0.01 × 100,086 ÷ 50 = 250.2 mg/L as CaCO3.

Q5. How do you calculate calcium and magnesium hardness separately?

Run a second EDTA titration at pH 12 to 13 with murexide or calcon indicator. Magnesium precipitates as hydroxide, so only calcium reacts. Calcium hardness comes from that volume with the same formula, and magnesium hardness is total hardness minus calcium hardness. From ion data, calcium hardness is 2.497 × Ca and magnesium hardness 4.118 × Mg.

Q6. How do you convert ppm to grains per gallon?

Divide ppm, or mg/L as CaCO3, by 17.12. One grain is 64.8 milligrams and one US gallon is 3.785 liters, so one grain per gallon is 17.12 mg/L. For example, 200 ppm is 11.68 gpg, 171 ppm is 10 gpg, and 60 ppm, the upper limit of soft water, is 3.5 gpg.

Q7. How do you convert grains per gallon to ppm?

Multiply grains per gallon by 17.12. So 10 gpg is 171.2 ppm as CaCO3, 15 gpg is 256.8 ppm, and 1 gpg is 17.1 ppm. Some test kits round the factor to 17.1 or 17; the exact value is 17.1185. Water softeners in the United States are set in grains per gallon, while utilities report ppm.

Q8. What is a German degree of hardness (°dH)?

One German degree, °dH or dGH, is 10 mg/L of calcium oxide, which equals 17.85 mg/L as CaCO3 or 0.178 mmol/L. To convert, multiply °dH by 17.85 for ppm, or divide ppm by 17.85. Aquarium general hardness (GH) and many European dishwashers use °dH: 8 °dH is about 143 ppm.

Q9. What is the water hardness scale?

The USGS scale is 0 to 60 mg/L as CaCO3 soft, 61 to 120 moderately hard, 121 to 180 hard, and over 180 very hard. The water softener scale in grains per gallon is under 1 soft, 1 to 3.5 slightly hard, 3.5 to 7 moderately hard, 7 to 10.5 hard and over 10.5 very hard.

Q10. How do you calculate water softener hardness setting?

Convert your hardness to grains per gallon, add 4 grains for every ppm of dissolved iron, and round up. That number is the hardness setting on the control valve. For 15 gpg and 1 ppm iron, the setting is 19 gpg. If softened water still tests hard, raise the setting by 1 or 2 grains.

Q11. What size water softener do I need?

Multiply people by daily use per person, usually about 75 gallons, then by the compensated hardness in grains per gallon, to get grains removed per day. Multiply by the days you want between regenerations, often 7. For 4 people at 19 gpg, 4 × 75 × 19 × 7 = 39,900 grains, so a 40,000-grain softener.

Q12. How many days between water softener regenerations?

Divide the softener capacity in grains by the grains removed per day, then keep about one day in reserve. A 32,000-grain softener in a home using 4,500 grains a day lasts 7.1 days to exhaustion, so it regenerates every 6 days. Gallons between regenerations equal capacity divided by the hardness setting.

Q13. What is the difference between carbonate and non-carbonate hardness?

Carbonate, or temporary, hardness is calcium and magnesium balanced by bicarbonate, and boiling turns it into scale. Non-carbonate, or permanent, hardness is balanced by sulfate, chloride or nitrate and stays in solution. Carbonate hardness equals the smaller of total hardness and alkalinity, both as CaCO3; non-carbonate hardness is the remainder.

Q14. Is mg/L the same as ppm for water hardness?

For fresh water, yes. One liter of dilute water weighs about one kilogram, so 1 mg/L is 1 part per million by mass. Both must be expressed as CaCO3 to be hardness values. A report giving calcium as 40 mg/L means 40 ppm of calcium ion, which is 99.9 ppm of hardness as CaCO3.

Q15. How do you convert mmol/L hardness to mg/L as CaCO3?

Multiply mmol/L by 100.086, the molar mass of calcium carbonate. 1 mmol/L of hardness is 100.09 mg/L as CaCO3, 2.5 mmol/L is 250.2 mg/L, and 1.5 mmol/L, the German limit between soft and medium water, is 150.1 mg/L. For milliequivalents per liter, multiply by 50.04 instead, because each divalent ion carries two equivalents.

Q16. Does a TDS meter measure water hardness?

No. A TDS meter measures electrical conductivity and estimates all dissolved solids, including sodium, potassium, chloride, sulfate and nitrate. Hardness counts only calcium, magnesium and other divalent metals. Softened water can have a high TDS but near zero hardness. Use a hardness test strip, an EDTA titration or a laboratory calcium and magnesium analysis.

Q17. Is hard water bad for your health?

Hard water is not a health hazard, and the WHO sets no health-based limit for hardness. Reviews of observational studies link magnesium in drinking water with lower cardiovascular mortality. Hard water is associated with infant eczema, but a randomized trial of household softeners found no clear benefit. Its main effects are scale, soap use and appliance life.

Q18. How much sodium does a water softener add?

Ion exchange replaces each calcium or magnesium ion with two sodium ions. Softening 1 grain per gallon adds about 7.5 to 8 mg/L of sodium, or about 0.46 mg/L of sodium per mg/L of hardness removed. Water at 15 gpg gains about 115 to 120 mg/L of sodium. Potassium chloride salt or a bypassed drinking tap avoids this.

Q19. How do you calculate water hardness in Excel?

Put calcium in A2 and magnesium in B2, then type =2.497*A2+4.118*B2 for hardness in mg/L as CaCO3. Divide by 17.1185 for grains per gallon and by 17.848 for °dH. For a titration, use =(A2-B2)*C2*100086/D2 with EDTA volume, blank, molarity and sample volume. Fill the formulas down to calculate many samples at once.

Q20. What is the hardness of rain, tap and well water?

Rainwater is usually soft, under 10 mg/L as CaCO3. Tap water varies with its source, from soft to over 300 mg/L, and surveys of tap and bottled waters find calcium and magnesium vary widely between brands and cities. Wells in limestone and chalk are often very hard. Check your utility report or test it yourself.

📑 20. Cite This Tool

APA 7th edition
StatsUnlock. (2026). Water hardness calculator [Interactive laboratory tool]. https://statsunlock.com/water-hardness-calculator/
BibTeX
@misc{statsunlock_water_hardness_calculator_2026, title={Water Hardness Calculator}, author={{StatsUnlock Team}}, year={2026}, note={Interactive laboratory tool}, url={https://statsunlock.com/water-hardness-calculator/}}
Methods sentence (fills from your last calculation)
Total hardness was calculated from calcium and magnesium as 2.497[Ca] + 4.118[Mg] mg/L as CaCO3 (APHA Standard Methods 2340 B) using the StatsUnlock Water Hardness Calculator (2026).

🔗 21. Related Tools

📖 22. Glossary of Terms

TermPlain-English meaning
AlkalinityAcid-neutralizing capacity, mostly bicarbonate, reported as mg/L CaCO₃.
Calcium hardnessThe part of hardness from calcium: 2.497 × Ca.
Carbonate (temporary) hardnessHardness balanced by bicarbonate; removed by boiling.
Compensated hardnessSoftener setting: hardness in gpg plus an allowance for iron.
°dHGerman degree: 10 mg/L CaO = 17.85 mg/L CaCO₃.
°eEnglish or Clark degree: 1 grain per imperial gallon = 14.25 mg/L.
EDTAEthylenediaminetetraacetic acid; binds Ca and Mg 1:1.
Eriochrome Black TIndicator: wine red with Mg, blue when free, at pH 10.
°fHFrench degree: 10 mg/L CaCO₃.
Grain per gallon (gpg)64.8 mg per US gallon = 17.12 mg/L as CaCO₃.
Ion exchangeResin swaps Ca and Mg for Na or K.
Magnesium hardnessThe part of hardness from magnesium: 4.118 × Mg.
meq/LMilliequivalents per liter; 1 meq/L = 50.04 mg/L as CaCO₃.
mg/L as CaCO₃Hardness expressed as the equivalent mass of calcium carbonate; = ppm.
MurexideIndicator for calcium alone at pH 12 to 13.
Non-carbonate (permanent) hardnessHardness balanced by sulfate, chloride or nitrate.
RegenerationFlushing the softener resin with brine to restore capacity.
ScaleCaCO₃ deposit from heated hard water.
Total hardnessSum of all divalent metal ions as CaCO₃.
USGS scaleSoft 0 to 60, moderate 61 to 120, hard 121 to 180, very hard over 180 mg/L.

📚 23. References

Peer-reviewed sources behind this water hardness calculator: IUPAC atomic weights, EDTA complexometric titration, ion-exchange softening, calcium and magnesium in tap and bottled water, hardness and health, regulation, and measurement uncertainty. Standards (APHA Standard Methods 2340 B and C, JCGM 100:2008, NSF/ANSI 44) are named where they are used. Every DOI checked October 2026.

  1. Apell, J. N., & Boyer, T. H. (2010). Combined ion exchange treatment for removal of dissolved organic matter and hardness. Water Research, 44(8), 2419–2430. https://doi.org/10.1016/j.watres.2010.01.004
  2. Azoulay, A., Garzon, P., & Eisenberg, M. J. (2001). Comparison of the mineral content of tap water and bottled waters. Journal of General Internal Medicine, 16(3), 168–175. https://doi.org/10.1111/j.1525-1497.2001.04189.x
  3. Brastad, K. S., & He, Z. (2013). Water softening using microbial desalination cell technology. Desalination, 309, 32–37. https://doi.org/10.1016/j.desal.2012.09.015
  4. Catling, L. A., Abubakar, I., Lake, I. R., Swift, L., & Hunter, P. R. (2008). A systematic review of analytical observational studies investigating the association between cardiovascular disease and drinking water hardness. Journal of Water and Health, 6(4), 433–442. https://doi.org/10.2166/wh.2008.054
  5. Cole, T. J. (2015). Too many digits: The presentation of numerical data. Archives of Disease in Childhood, 100(7), 608–609. https://doi.org/10.1136/archdischild-2014-307149
  6. Danby, S. G., Brown, K., Wigley, A. M., Chittock, J., Pyae, P. K., Flohr, C., & Cork, M. J. (2018). The effect of water hardness on surfactant deposition after washing and subsequent skin irritation in atopic dermatitis patients and healthy control subjects. Journal of Investigative Dermatology, 138(1), 68–77. https://doi.org/10.1016/j.jid.2017.08.037
  7. Goldberg, D. (1991). What every computer scientist should know about floating-point arithmetic. ACM Computing Surveys, 23(1), 5–48. https://doi.org/10.1145/103162.103163
  8. Jiang, L., He, P., Chen, J., Liu, Y., Liu, D., Qin, G., & Tan, N. (2016). Magnesium levels in drinking water and coronary heart disease mortality risk: A meta-analysis. Nutrients, 8(1), 5. https://doi.org/10.3390/nu8010005
  9. Kožíšek, F. (2020). Regulations for calcium, magnesium or hardness in drinking water in the European Union member states. Regulatory Toxicology and Pharmacology, 112, 104589. https://doi.org/10.1016/j.yrtph.2020.104589
  10. Kragten, J. (1994). Calculating standard deviations and confidence intervals with a universally applicable spreadsheet technique. Analyst, 119(10), 2161–2165. https://doi.org/10.1039/AN9941902161
  11. Monarca, S., Donato, F., Zerbini, I., Calderon, R. L., & Craun, G. F. (2006). Review of epidemiological studies on drinking water hardness and cardiovascular diseases. European Journal of Cardiovascular Prevention & Rehabilitation, 13(4), 495–506. https://doi.org/10.1097/01.hjr.0000214608.99113.5c
  12. Morr, S., Cuartas, E., Alwattar, B., & Lane, J. M. (2006). How much calcium is in your drinking water? A survey of calcium concentrations in bottled and tap water and their significance for medical treatment and drug administration. HSS Journal, 2(2), 130–135. https://doi.org/10.1007/s11420-006-9000-9
  13. Newell, D. B., Cabiati, F., Fischer, J., Fujii, K., Karshenboim, S. G., Margolis, H. S., de Mirandés, E., Mohr, P. J., Nez, F., Pachucki, K., Quinn, T. J., Taylor, B. N., Wang, M., Wood, B. M., & Zhang, Z. (2018). The CODATA 2017 values of h, e, k, and NA for the revision of the SI. Metrologia, 55(1), L13–L16. https://doi.org/10.1088/1681-7575/aa950a
  14. Perkin, M. R., Craven, J., Logan, K., Strachan, D., Marrs, T., Radulovic, S., Campbell, L. E., MacCallum, S. F., McLean, W. H. I., Lack, G., & Flohr, C. (2016). Association between domestic water hardness, chlorine, and atopic dermatitis risk in early life: A population-based cross-sectional study. Journal of Allergy and Clinical Immunology, 138(2), 509–516. https://doi.org/10.1016/j.jaci.2016.03.031
  15. Prohaska, T., Irrgeher, J., Benefield, J., Böhlke, J. K., Chesson, L. A., Coplen, T. B., Ding, T., Dunn, P. J. H., Gröning, M., Holden, N. E., Meijer, H. A. J., Moossen, H., Possolo, A., Takahashi, Y., Vogl, J., Walczyk, T., Wang, J., Wieser, M. E., Yoneda, S., Zhu, X.-K., & Meija, J. (2022). Standard atomic weights of the elements 2021 (IUPAC Technical Report). Pure and Applied Chemistry, 94(5), 573–600. https://doi.org/10.1515/pac-2019-0603
  16. Rubenowitz, E., Molin, I., Axelsson, G., & Rylander, R. (2000). Magnesium in drinking water in relation to morbidity and mortality from acute myocardial infarction. Epidemiology, 11(4), 416–421. https://doi.org/10.1097/00001648-200007000-00009
  17. Thomas, K. S., Dean, T., O’Leary, C., Sach, T. H., Koller, K., Frost, A., Williams, H. C., & the SWET Trial Team. (2011). A randomised controlled trial of ion-exchange water softeners for the treatment of eczema in children. PLoS Medicine, 8(2), e1000395. https://doi.org/10.1371/journal.pmed.1000395
  18. Tiesinga, E., Mohr, P. J., Newell, D. B., & Taylor, B. N. (2021). CODATA recommended values of the fundamental physical constants: 2018. Reviews of Modern Physics, 93(2), 025010. https://doi.org/10.1103/RevModPhys.93.025010
  19. Yang, C.-Y. (1998). Calcium and magnesium in drinking water and risk of death from cerebrovascular disease. Stroke, 29(2), 411–414. https://doi.org/10.1161/01.STR.29.2.411
  20. Yappert, M. C., & DuPré, D. B. (1997). Complexometric titrations: Competition of complexing agents in the determination of water hardness with EDTA. Journal of Chemical Education, 74(12), 1422. https://doi.org/10.1021/ed074p1422
STATS UNLOCK · statsunlock.com · Water Hardness Calculator · StatsUnlock Team
RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Statistical Models

Important Plots & Charts

Calculators and Converters