Water Hardness Calculator

A water report lists calcium and magnesium separately, but a kettle, a water heater and a softener all care about one combined number: total hardness. This free water hardness calculator turns the two ions into that number. Run 100 mg/L of calcium and 30 mg/L of magnesium through it and the answer is 373.2 mg/L as CaCO3, which is 21.83 grains per gallon and Very hard water on the USGS scale. Calcium contributes 249.7 mg/L of that total and magnesium contributes 123.5 mg/L.

Your Water

Enter the calcium and magnesium from your water report, in mg/L as the elements. The calculator converts each to its calcium carbonate equivalent and adds them, which is how total hardness is reported. Zero for both is allowed: distilled water has no hardness at all.

Your water, in the kettle 373.2 mg/L as CaCO3 Very hard Scale builds up faster as hardness rises 0 400 mg/L 373.2 mg/L as CaCO3, Very hard 21.83 grains per gallon
Your hardness
Total Hardness (mg/L as CaCO3)
Hardness (grains per gallon)
Classification (USGS)
Where it comes from
Calcium Contribution
Magnesium Contribution
Formula Used
Hardness counts calcium and magnesium only: iron, manganese and strontium can add a little in unusual waters, but this calculator follows the standard reporting convention and leaves them out. In water, mg/L and ppm are the same number, so 373.2 mg/L as CaCO3 is also 373.2 ppm. There is no US federal limit for hardness; it is an aesthetic and scaling matter, not a health limit.
Water SourceCalcium (mg/L)Magnesium (mg/L)Hardness (mg/L as CaCO3)Grains per GallonClass

Eight typical waters, from distilled water to seawater. The highlighted row matches your calcium and magnesium: no row matches 100 mg/L calcium and 30 mg/L magnesium.

Powered by Techraxy

Creator & Reviewer

Faiq Ur Rahman

Founder & CEO, Techraxy

Faiq Ur Rahman is a web designer, digital product developer, and Founder of Techraxy, a growing platform of online calculators and utility tools. He specializes in building structured, user-friendly tools focused on finance, health, conversions, productivity, and everyday problem-solving. He is passionate about developing practical digital solutions that make complex tasks simpler for users worldwide.

Share:

Rate this Tool

User Ratings:

0
0 out of 5 stars (based on 0 reviews)
Excellent
Very good
Average
Poor
Terrible

ADVERTISEMENT

ADVERTISEMENT

A water report lists calcium and magnesium separately, but a kettle, a water heater and a softener all care about one combined number: total hardness. This free water hardness calculator turns the two ions into that number. Run 100 mg/L of calcium and 30 mg/L of magnesium through it and the answer is 373.2 mg/L as CaCO3, which is 21.83 grains per gallon and Very hard water on the USGS scale. Calcium contributes 249.7 mg/L of that total and magnesium contributes 123.5 mg/L.

The calculator takes two inputs: calcium in mg/L and magnesium in mg/L, both as the elements. It returns the total hardness in mg/L as CaCO3, the hardness in grains per gallon, the USGS classification, and each ion’s contribution. The diagram shows a kettle with a layer of limescale at the bottom whose thickness follows the hardness, with a gauge showing where the value falls on a scale of 0 to 400 mg/L.

What is a Water Hardness Calculator?

A water hardness calculator is a tool that turns dissolved calcium and magnesium into total hardness, the measure of how much soap a water wastes and how much scale it leaves behind. Hardness is caused by dissolved multivalent ions, chiefly calcium (Ca2+) and magnesium (Mg2+), which come from water passing through limestone, chalk and dolomite. The ions react with soap to form scum instead of lather, and when hard water is heated the calcium carbonate comes out of solution as limescale on kettles, water heaters and pipes.

The result is reported as mg/L as CaCO3, which is a reporting convention, not a claim that the water holds that much solid chalk. Calcium and magnesium have different atomic masses, so a milligram of each does not count equally toward hardness, and the CaCO3 equivalent puts them on one scale. The conversion factors come straight from the molar masses: calcium carbonate is 100.09 g/mol, calcium is 40.08 g/mol and magnesium is 24.31 g/mol, so the calcium factor is 100.09 divided by 40.08, which is 2.497, and the magnesium factor is 100.09 divided by 24.31, which is 4.118. A milligram of magnesium carries more charge equivalents than a milligram of calcium, which is why its factor is larger.

Grains per gallon is the unit the softener industry uses, and one grain per US gallon is 17.1 mg/L, so dividing the mg/L figure by 17.1 gives grains per gallon. In water, mg/L and parts per million are the same number, so 373.2 mg/L as CaCO3 is also 373.2 ppm. Hardness is only part of the dissolved load in a water: the total of everything dissolved is a separate figure, and the TDS Calculator works that out when the full analysis is known.

How to Use the Water Hardness Calculator

Enter the calcium in mg/L and the magnesium in mg/L from your water report, both as the elements, not as CaCO3. The calculator updates as soon as you change either input, and the Calculate button runs it again at any time. Zero for both is allowed: distilled water has no hardness at all, and it is reported as 0.0 mg/L and Soft.

Read the results in order. The first rows give the total hardness in mg/L as CaCO3, the hardness in grains per gallon, and the USGS classification, then the calcium contribution and the magnesium contribution, then the formula used. The highlight sentence repeats the answer in plain words, with the inputs it used, so you can check that nothing was mistyped.

The diagram shows a kettle on a bench. The limescale layer at the bottom thickens with hardness, the flecks inside it multiply, the water darkens from pale blue to rusty brown, and the gauge at the bottom fills on a scale of 0 to 400 mg/L. Changing either ion moves the scale, the colour and the gauge, because both feed the same total.

The Compare Waters tab puts eight typical waters side by side: distilled water at 0 mg/L calcium and 0 mg/L magnesium, rainwater at 3 and 1, soft tap water at 15 and 3, typical tap water at 45 and 10, hard tap water at 75 and 15, very hard well water at 120 and 25, mineral water at 90 and 20, and seawater at 400 and 1300 mg/L. The row matching your calcium and magnesium is highlighted. If no row matches, the note says so.

Water Hardness Calculator Formula

The formula is total hardness in mg/L as CaCO3 equals 2.497 times calcium plus 4.118 times magnesium, where calcium and magnesium are in mg/L as the elements. Grains per gallon equals the mg/L figure divided by 17.1. The classification follows the USGS bands in mg/L as CaCO3: soft from 0 to 60, moderately hard from 61 to 120, hard from 121 to 180, and very hard above 180.

Written out for the defaults, 100 mg/L of calcium and 30 mg/L of magnesium: the calcium contribution is 2.497 times 100, which is 249.7 mg/L as CaCO3. The magnesium contribution is 4.118 times 30, which is 123.5 mg/L as CaCO3. Adding them gives 373.2 mg/L as CaCO3. Dividing by 17.1 gives 21.83 grains per gallon. Since 373.2 is above 180, the classification is Very hard.

The factors come from the molar masses. Calcium carbonate has a molar mass of about 100.09 g/mol and carries two charge equivalents, giving an equivalent weight of about 50.04 g per equivalent. Calcium has an equivalent weight near 20.04 g per equivalent and magnesium near 12.15 g per equivalent, so dividing 50.04 by 20.04 gives 2.497 and dividing 50.04 by 12.15 gives 4.118. The precise grains per gallon figure is 17.118 mg/L per grain per US gallon; this calculator uses 17.1, which changes the last digit only in the second decimal place.

Worked Example

Take a household well with 40 mg/L of calcium and 12 mg/L of magnesium. First, the calcium contribution is 2.497 times 40, which is 99.9 mg/L as CaCO3. The magnesium contribution is 4.118 times 12, which is 49.4 mg/L as CaCO3. Adding them gives 149.3 mg/L as CaCO3. Dividing by 17.1 gives 8.73 grains per gallon. Since 149.3 falls between 121 and 180, the classification is Hard.

The same steps give a useful round check with distilled water. At 0 mg/L of calcium and 0 mg/L of magnesium, both contributions are zero, the total is 0.0 mg/L as CaCO3, the grains per gallon are 0.00, and the classification is Soft. That is the only case where a hardness of exactly zero is expected, and it is how a lab checks that a new instrument reads zero on a blank.

A second check shows why magnesium counts for more per milligram. Take 100 mg/L of calcium alone: the total is 249.7 mg/L as CaCO3. Take 100 mg/L of magnesium alone: the total is 411.8 mg/L as CaCO3. The same weighed mass of magnesium gives about 65 percent more hardness, because magnesium is lighter and each milligram holds more charge equivalents.

Benefits of Using a Water Hardness Calculator

The first benefit is reading a lab report in the unit that matters. A report lists calcium and magnesium as the elements, but a softener is sized in grains per gallon, a kettle manual warns in mg/L, and a neighbour quotes ppm, and all three are the same quantity in different clothes. The calculator gives all three at once, with each ion’s contribution shown, so the step from the report to the decision is visible instead of hidden.

The second benefit is knowing whether treatment is worth it. Below 60 mg/L the water is soft and needs no treatment, from 61 to 120 mg/L it is moderately hard and most homes get by, from 121 to 180 mg/L it is hard and scale becomes a real cost, and above 180 mg/L it is very hard and a softener usually pays for itself in appliance life and soap saved. The classification is the USGS one, so it matches the scale on the USGS water pages and in most textbooks.

The third benefit is sizing the fix correctly. A softener is rated in grains of capacity, and the daily grain load is the grains per gallon times the gallons used per day, so the grains per gallon figure is the one the sizing calculation starts from. A water at 21.83 grains per gallon needs roughly three times the softener capacity of a water at 7 grains per gallon for the same household, and the calculator makes that comparison in one step.

The fourth benefit is separating hardness from the rest of the dissolved load. A softener swaps calcium and magnesium for sodium or potassium, which lowers hardness but does not lower total dissolved solids, and only reverse osmosis does that. The Compare Waters tab holds all eight reference waters in one place, from distilled water at zero to seawater at 6,352.2 mg/L, so a student can see the full range of what water can carry without working each conversion by hand.

Frequently Asked Questions

How do you calculate water hardness from calcium and magnesium?

Multiply the calcium in mg/L by 2.497, multiply the magnesium in mg/L by 4.118, and add the two. In one line: hardness in mg/L as CaCO3 equals 2.497 times Ca plus 4.118 times Mg. For 100 mg/L of calcium and 30 mg/L of magnesium, that is 249.7 plus 123.5, which is 373.2 mg/L as CaCO3. Divide by 17.1 to get grains per gallon, which is 21.83 here. Both inputs must be mg/L as the elements, not as CaCO3, or the factors do not apply.

What do the USGS hardness bands mean?

The USGS classifies water by mg/L as CaCO3: soft from 0 to 60, moderately hard from 61 to 120, hard from 121 to 180, and very hard above 180. The bands are descriptive, not health limits: nothing changes abruptly at 120 mg/L, and there is no US federal limit for hardness. Other tables split the low end differently, for example calling 17 to 60 mg/L slightly hard, but every scale agrees from moderately hard upward, and the USGS bands are the ones this calculator uses.

Is 1 grain per gallon really 17.1 mg/L?

Yes, to the precision this calculator uses. One grain is 64.79891 mg and one US gallon is 3.78541 litres, so one grain per US gallon is 64.79891 divided by 3.78541, which is 17.118 mg/L. This calculator uses 17.1, which shifts the result only in the second decimal place: 373.2 mg/L is 21.83 grains per gallon at 17.1 and 21.81 at 17.118. The mg/L and ppm figures are identical for water, so a report in ppm needs no conversion at all.

Does hard water need to be treated for health reasons?

No. The World Health Organization sets no health-based guideline value for hardness, and calcium and magnesium are dietary minerals that contribute to intake. Hardness is an aesthetic and scaling matter: soap scum, spotty glassware, stiff laundry, and limescale in kettles and water heaters. Very soft water can be more corrosive to some plumbing, so softening is a trade-off, not a purification step, and a softener does not make water safer to drink.

Why does seawater have a hardness over 6,000 mg/L?

Because seawater carries about 400 mg/L of calcium and about 1300 mg/L of magnesium, far more than any fresh water. The calcium contributes 2.497 times 400, which is 998.8 mg/L as CaCO3, and the magnesium contributes 4.118 times 1300, which is 5353.4 mg/L as CaCO3, giving 6352.2 mg/L in total, or 371.47 grains per gallon. Magnesium dominates the figure, which is also why magnesium matters more than its share of the mass suggests: it is lighter, so a milligram of it holds more charge equivalents than a milligram of calcium.

Calculator Sources

  • USGS — Hardness of Water, from the USGS Water Science School, with the classification bands soft 0 to 60, moderately hard 61 to 120, hard 121 to 180 and very hard over 180 mg/L as CaCO3, and the note that hard water is a scaling and aesthetic matter.
  • Wikipedia — Hard water, with hardness defined as the dissolved calcium and magnesium content, reported as mg/L as CaCO3, and the USGS classification bands.
  • Wikipedia — Calcium carbonate, with the molar mass of 100.09 g/mol from which the 2.497 and 4.118 conversion factors are derived.
  • US EPA — Secondary drinking water standards, with the guidance that hardness has no primary standard and is treated as a nuisance characteristic affecting taste, scale and soap use.
  • World Health Organization — Guidelines for drinking-water quality, with the background that no health-based guideline value is set for hardness and that calcium and magnesium are dietary minerals.

Disclaimer

This calculator turns calcium and magnesium concentrations into total hardness from the two values you enter, and it is for study, homework and general reference only. The result counts calcium and magnesium only, as the standard reporting convention does, and it ignores iron, manganese, strontium and other multivalent ions, which contribute almost nothing in most fresh water but can matter in unusual waters. The USGS bands are descriptive, not health limits, and there is no US federal limit for hardness. Do not use it for drinking water safety decisions, for sizing a softener without a full water analysis, or for regulatory compliance, and get a laboratory test before choosing treatment for a specific home.

Last updated: 2 December 2026

ADVERTISEMENT

ADVERTISEMENT