Skip to content

Water Hardness Calculator

Updated:

Enter the measured calcium and magnesium concentrations and this water hardness calculator converts them to total hardness in mg/L as CaCO₃, classifies the water from soft to very hard, and shows the result in grains per gallon, German and French degrees.

Calculate Water Hardness from Calcium and Magnesium

Input Fields
Ca
Measured calcium ion concentration in the water sample
Mg
Measured magnesium ion concentration in the water sample
If enabled, the result will update automatically when you change any value.

Water Hardness Formula

Formula
\[ TH = \left[ \text{Ca}^{2+} \right] \times \frac{M_{\text{CaCO}_3}}{M_{\text{Ca}}} + \left[ \text{Mg}^{2+} \right] \times \frac{M_{\text{CaCO}_3}}{M_{\text{Mg}}} \] \[ TH = 2.497 \times \left[ \text{Ca}^{2+} \right] + 4.118 \times \left[ \text{Mg}^{2+} \right] \quad \text{(mg/L as CaCO}_3\text{, with ion concentrations in mg/L)} \]

Where:

  • \(TH\) — total hardness (mg/L as CaCO₃)
  • \(\left[ \text{Ca}^{2+} \right]\) — calcium ion concentration (mg/L)
  • \(\left[ \text{Mg}^{2+} \right]\) — magnesium ion concentration (mg/L)
  • \(M_{\text{CaCO}_3} = 100.09\) g/mol, \(M_{\text{Ca}} = 40.078\) g/mol, \(M_{\text{Mg}} = 24.305\) g/mol — molar masses

The formula expresses each ion's concentration as an equivalent amount of calcium carbonate, the standard reference substance for water hardness, and sums the two contributions. If your concentrations are given in mmol/L, multiply by the molar mass of the ion (40.078 for Ca²⁺, 24.305 for Mg²⁺) to convert to mg/L first.

Water Hardness – Calculation Example

Example: a household water sample contains 50 mg/L of calcium and 10 mg/L of magnesium. What is the total hardness?

\[ TH_{\text{Ca}} = 50 \times \frac{100.09}{40.078} = 50 \times 2.497 = 124.9 \text{ mg/L as CaCO}_3 \]

\[ TH_{\text{Mg}} = 10 \times \frac{100.09}{24.305} = 10 \times 4.118 = 41.2 \text{ mg/L as CaCO}_3 \]

\[ TH = 124.9 + 41.2 = 166.0 \text{ mg/L as CaCO}_3 \]

Result: the total hardness is 166.0 mg/L as CaCO₃, which classifies the water as hard water (121–180 mg/L band). In other units this equals about 9.7 grains per US gallon, 9.3 German degrees (°dH), 16.6 French degrees (°fH), 1.659 mmol/L and 3.318 mEq/L as CaCO₃. Calcium contributes 75.2% of the hardness and magnesium 24.8%.

How to Use the Water Hardness Calculator

  1. Enter the measured calcium concentration in the Calcium (Ca²⁺) field and choose mg/L or mmol/L as the unit.
  2. Enter the measured magnesium concentration in the Magnesium (Mg²⁺) field and select its unit. Both values must be zero or greater, and at least one must be non-zero.
  3. Read the Total Hardness result in mg/L as CaCO₃.
  4. Check the Hardness Classification (soft, moderately hard, hard, or very hard), the equivalent values in other units, and the step-by-step calculation details.

What Is Water Hardness?

Water hardness is a measure of the dissolved polyvalent metal ions in water — in practice, almost entirely calcium (Ca²⁺) and magnesium (Mg²⁺). As rainwater percolates through limestone, chalk, gypsum and other minerals, it dissolves calcium and magnesium compounds, so hard water is typical in regions with sedimentary rock, while soft water is common where granite dominates the geology.

Hardness is conventionally reported "as CaCO₃": every hardness-causing ion is converted to the mass of calcium carbonate that would produce the same effect. This makes results from different water sources directly comparable on a single scale. The common classification bands are 0–60 mg/L as CaCO₃ for soft water, 61–120 mg/L for moderately hard, 121–180 mg/L for hard, and above 180 mg/L for very hard water — the same bands used by the WHO and the US Geological Survey.

Hardness matters mainly for practical, not health, reasons. Hard water forms limescale in kettles, boilers, dishwashers and hot-water pipes, reduces the efficiency of detergents by forming soap scum, and leaves spots on glassware and fixtures. Soft water, on the other hand, can be slightly corrosive to pipes. Neither extreme is dangerous: calcium and magnesium are essential dietary minerals, and drinking hard water actually contributes a small share of your daily intake of both. If you analyse other aspects of the same sample, our pH calculator and ionic strength calculator cover related water-chemistry parameters.

Interpreting your result is straightforward: below 60 mg/L you will rarely notice hardness effects; 61–120 mg/L is fine for most uses but may show mild scale; 121–180 mg/L usually means visible scale in kettles and noticeable soap consumption; above 180 mg/L, a water softener or descaling maintenance is often worthwhile.

Assumptions, Limitations and Practical Tips

  • Only Ca²⁺ and Mg²⁺ are counted. Other polyvalent ions — Fe²⁺, Mn²⁺, Sr²⁺, Al³⁺ — also contribute to hardness, but in normal drinking water their concentrations are negligible compared with calcium and magnesium.
  • Measure the ions, not the salts. Enter the concentration of the free calcium and magnesium ions (as reported by a water analysis or test strip for Ca and Mg), not the mass of compounds such as CaCl₂. If your lab report lists concentrations in mmol/L, the calculator converts them automatically. For help converting between concentration units, see the molarity calculator and normality calculator.
  • mg/L ≈ ppm. For water, 1 mg/L is practically identical to 1 part per million, so values from ppm test kits can be entered directly.
  • Temporary vs. permanent hardness. This calculator reports total hardness. Temporary (carbonate) hardness can be removed by boiling; permanent hardness cannot. Boiling a kettle can therefore slightly reduce hardness in hard-water areas, while the scale left behind is the deposited CaCO₃.
  • Home test kits usually report total hardness directly in mg/L as CaCO₃ or in grains per gallon (1 gpg = 17.118 mg/L as CaCO₃). If your kit already gives hardness as CaCO₃, you do not need this conversion — this tool is for when you know the separate Ca and Mg concentrations.
  • Hard water and precipitation. Very hard water combined with a high pH is more prone to scale formation; to explore whether a sparingly soluble salt will precipitate from a solution, try our precipitation prediction calculator.

Frequently Asked Questions

Is hard water harmful to drink?

No, hard water is not a health hazard in normal amounts. Calcium and magnesium are essential dietary minerals, and drinking hard water contributes a modest share of your daily intake. The WHO sets no health-based limit on hardness; the concerns are practical — limescale in kettles and pipes, soap scum, and spots on glassware. If you have a specific medical condition such as kidney stones, discuss your water and diet with your doctor rather than relying on hardness numbers alone.

What is the ideal water hardness for a home?

Most households are comfortable in the 60–120 mg/L as CaCO₃ range (about 3.5–7 grains per gallon). Water this hard rarely causes noticeable scale but is not so soft that it becomes corrosive to metal pipes. Above 180 mg/L (over 10.5 gpg), many people install a softener or descale appliances regularly. There is no single "correct" value — the right choice depends on your appliances, plumbing, and personal preference.

How do I convert between grains per gallon, German degrees and mg/L as CaCO₃?

Divide mg/L as CaCO₃ by 17.118 to get grains per US gallon, by 17.848 to get German degrees (°dH), or by 10 to get French degrees (°fH). Going the other way, multiply by the same numbers. For example, 150 mg/L as CaCO₃ is about 8.8 gpg, 8.4 °dH and 15 °fH. Note that 1 German degree equals 10 mg/L of CaO, which is where the 17.848 factor comes from.

What is the difference between water hardness and alkalinity?

Hardness measures the amount of calcium and magnesium ions; alkalinity measures the water's capacity to neutralize acid, mainly from bicarbonates and carbonates. They are independent: water can be hard with low alkalinity and vice versa. The two are often confused because both are reported "as CaCO₃." This calculator only computes hardness from Ca²⁺ and Mg²⁺ — a separate alkalinity test (or total dissolved solids analysis) is needed to characterize the buffering capacity of the same sample.

My test strip shows only total hardness. How do I get separate calcium and magnesium values?

You cannot split a total-hardness reading into its two components without more information. Many aquarium and pool kits sell separate calcium tests, and magnesium can be estimated as total hardness minus calcium hardness. Alternatively, use this calculator in reverse: if you know the total and one ion's value, you can back-calculate the other. For precise work, a laboratory water analysis reports Ca²⁺ and Mg²⁺ individually, usually in mg/L or mmol/L.

Can I estimate hardness from TDS or conductivity readings?

Only very roughly. TDS meters measure all dissolved solids, not just calcium and magnesium, so a TDS value can overestimate hardness by a wide margin — sodium, chloride and sulfate also count toward TDS. As a crude rule of thumb, hardness is sometimes 50–70% of TDS in limestone regions, but this varies enormously by water source. For any decision about softeners or appliances, use an actual hardness, calcium, or magnesium test instead of a TDS estimate.

Why is my result wrong when I enter the amount of calcium carbonate or calcium chloride from my lab report?

The calculator expects the concentration of free Ca²⁺ and Mg²⁺ ions, not the mass of a compound. If your report lists CaCO₃, you already have a hardness value and no conversion is needed. If it lists a salt such as CaCl₂ or CaSO₄, first multiply by the mass fraction of the metal in that compound (0.361 for calcium in CaCl₂, 0.294 for calcium in CaSO₄·2H₂O) to get the ion concentration, then enter that.

Leave a Reply

Your email address will not be published. Required fields are marked *