Water Hardness Calculator
Estimate water hardness from calcium and magnesium concentrations.
Supports mg/L, g/L, g/mL, lb/US gal, and ppm units with bidirectional solving.
Updated September 13, 2026
What is water hardness?
Water hardness measures the concentration of dissolved mineral ions — primarily calcium () and magnesium () — in a water sample. These ions enter water naturally as it percolates through limestone, chalk, and other mineral-rich rock formations. The higher the mineral content, the harder the water.
Hardness is expressed as calcium carbonate (CaCO₃) equivalent, which standardizes the combined effect of all hardness-causing ions into a single number. This is the universal convention used by water utilities, appliance manufacturers, and plumbing codes.
Knowing your water hardness matters because it directly affects soap efficiency, appliance longevity, pipe scaling, and even the taste of drinking water. Very hard water leaves white deposits on fixtures and reduces soap lathering, while very soft water can be corrosive to metal pipes. Most municipal water reports include hardness values, but if you rely on well water or want to verify a report, testing is straightforward.
How to use this calculator
This calculator solves the water hardness equation in any direction. Enter any two known values — calcium concentration, magnesium concentration, or total hardness — and the third is calculated automatically. All fields support five concentration units (mg/L, g/L, g/mL, lb/US gal, ppm), and you can switch units at any time.
Choose your input fields
Enter the values you know. You can provide calcium and magnesium to find total hardness, or provide hardness and one ion concentration to find the other.
Select units
Use the unit dropdowns to match your source data. The default is mg/L, which is the standard unit for water quality reports. Results update instantly when you change units.
Read the result
The solved field appears in blue and updates in real time as you edit any input.
Worked example — forward calculation
A water sample contains 31 mg/L of calcium and 27 mg/L of magnesium. What is the total hardness?
The result of approximately 188.59 mg/L as CaCO₃ classifies this water as very hard (above 180 mg/L). In practice, water at this hardness level will cause noticeable scale buildup in kettles and pipes, and laundry detergent usage may need to be increased.
Formula and variables
Total water hardness is calculated by converting each ion concentration to its CaCO₃ equivalent and summing the results. The conversion factors account for the difference in molar mass between each ion and calcium carbonate:
Variable definitions
- — Total hardness as CaCO₃ equivalent (mg/L)
- — Calcium ion concentration (mg/L as Ca)
- — Magnesium ion concentration (mg/L as Mg)
- 2.497 — CaCO₃ equivalent weight per unit Ca (molar mass ratio: 100.09 / 40.08 ≈ 2.497)
- 4.118 — CaCO₃ equivalent weight per unit Mg (molar mass ratio: 100.09 / 24.31 ≈ 4.118)
The calculator also supports reverse calculations. If you know the total hardness and one ion concentration, it solves for the other:
Water hardness classification
The following classification is widely used by water treatment professionals and appliance manufacturers. Values are expressed as mg/L CaCO₃ equivalent:
| Hardness (mg/L CaCO₃) | Classification |
|---|---|
| Below 60 | Soft |
| 60 – 120 | Moderately hard |
| 121 – 180 | Hard |
| Above 180 | Very hard |
Most drinking water falls in the soft to moderately hard range. Water above 180 mg/L is considered very hard and may cause scale buildup in pipes and appliances, reduce soap lathering, and leave mineral deposits on dishes and fixtures. Many household water softeners are designed to bring hardness down to around 60–120 mg/L.
Tips for accurate measurement
Use the same unit throughout
If your calcium data is in mg/L and your magnesium data is in ppm, remember that these are numerically identical for dilute aqueous solutions — but mixing g/L and mg/L without conversion will produce a result that is off by 1,000×.
Both ions contribute to hardness
Magnesium contributes more to hardness per mg/L than calcium because of its lower atomic weight. A water sample with 50 mg/L of each ion is harder than one with 80 mg/L calcium and 20 mg/L magnesium — even though the total ion mass is the same.
Check your water source
Municipal water supplies are tested regularly and their hardness values are often published. Well water, spring water, and rainwater can vary significantly by location and season. If you are treating water for a specific purpose, test before and after treatment.
Reverse calculation can yield negative values
If you enter a hardness value that is too low relative to the known ion concentration, the reverse calculation may produce a negative result. This means the input data is physically inconsistent — check your measurements or whether other ions (like iron or strontium) are present.
Frequently asked questions
Is ppm the same as mg/L for water hardness?
For dilute aqueous solutions, 1 ppm is approximately equal to 1 mg/L. This is because the density of water is close to 1 g/mL, so one liter weighs roughly one kilogram. Water hardness in the typical range (below 500 mg/L) satisfies this assumption, so ppm and mg/L are used interchangeably in water quality reports.
Can I use this calculator if I only know total hardness?
Yes. If you know total hardness and one ion concentration (either calcium or magnesium), the calculator can solve for the other ion using the reverse formulas. For example, if your water report gives hardness = 200 mg/L and calcium = 40 mg/L, it will calculate the magnesium content.
Does boiling water remove hardness?
Boiling removes temporary hardness (caused by dissolved calcium bicarbonate) by precipitating calcium carbonate. It does not remove permanent hardness caused by calcium sulfate or magnesium compounds. For complete hardness removal, ion-exchange softeners or reverse osmosis systems are needed.
What hardness level is best for household use?
Most water treatment professionals recommend household water in the range of 60–120 mg/L as CaCO₃. Water in this range is soft enough to prevent scale buildup while still providing adequate mineral content for taste. Very soft water (below 60 mg/L) can taste flat and may leach metals from pipes, while very hard water (above 180 mg/L) causes scaling and reduces appliance efficiency.
Limitations
- Calcium and magnesium only: This calculator considers only calcium and magnesium ions. Other hardness-causing ions — such as iron, strontium, and manganese — are not included. In most natural waters these are minor contributors, but in some geological regions they can be significant.
- No temperature correction: The conversion factors assume standard conditions. While the effect of temperature on these mass-based concentrations is negligible for practical purposes, precise analytical work may require additional corrections.
- Concentration-based only: This tool works with ion concentrations, not with titration hardness test kits that measure total hardness directly. If you have a hardness test strip result, you can use it directly in the hardness field without breaking it down by ion.
- Not a water quality assessment: Hardness is one parameter among many. Water safety depends on bacterial content, chemical contaminants, pH, and numerous other factors. A low or high hardness value does not by itself indicate whether water is safe to drink.
Related Calculators
Atom Calculator
Calculate atomic properties including protons, neutrons, electrons, atomic number and mass number
Electron Configuration Calculator
Get the electron configuration for any element from the periodic table. View atomic number, atomic mass, and valence electrons.
Atomic Mass Calculator
Calculate atomic mass from protons and neutrons. Get atomic mass in various units including atomic mass units (u), kilograms, and more.
Electronegativity Calculator
Calculate electronegativity difference between two elements and determine bond type (ionic, polar covalent, or nonpolar covalent).
Average Atomic Mass Calculator
Calculate the average atomic mass of an element based on the isotopes and their natural abundances.
Mass Concentration to Molar Concentration Conversion
Convert mass concentration (g/L, kg/L, mg/L) to molar concentration (M, mM, μM) and vice versa using molar mass.