Home / Science / Earth sciences / Hydrogeology / Piper diagram makerTool #125

Piper diagram and Stiff diagram maker: water chemistry plots, meq/L conversion, ion balance and water type

Paste or open major-ion analyses in mg/L, meq/L or mmol/L. Get a Piper diagram with groups, Stiff diagrams, the ion balance error for each sample, the water type (such as Ca-HCO₃ or Na-Cl), the diamond field and total hardness. Download as PNG, PDF or Word.

Keep it one tap away for everyday use.

Bookmark Piper diagram maker?

Press Ctrl + D now. Your browser opens its own bookmark box, where you choose the name and folder.

  1. Water data
  2. To meq/L
  3. Piper plot
  4. Water type
Nothing is uploadedWorks offline once open

Water analyses

Needed columns: Ca, Mg, Na, SO4, Cl, and HCO3 or alkalinity (Alk, as mg/L CaCO₃ or meq/L). K, CO3 and NO3 are used when present; a blank or "<" value counts as zero. Names like Ca2+, Calcium or Sulfate are recognised, and a combined Na+K column works too. The example data are made up.

Piper diagram

Stiff diagrams

Each Stiff shape puts cations to the left and anions to the right of the centre line, in meq/L, on the same scale for every sample: Na+K and Cl on the top row, Ca and HCO₃+CO₃ in the middle, Mg and SO₄ at the bottom. Similar waters have similar shapes.

Download

What it does

Every groundwater, river or spring sample carries a handful of major ions: calcium, magnesium, sodium and potassium on the positive side, and bicarbonate, sulfate and chloride on the negative side. Their balance tells you a lot about where the water has been. Rain that has soaked through limestone is rich in calcium and bicarbonate. Old, deep water or water near the sea is often rich in sodium and chloride.

A Piper diagram shows many samples at once. Each sample appears three times: once in the cation triangle, once in the anion triangle, and once in the diamond above, where the two are combined. Samples of the same kind of water cluster together. A Stiff diagram turns each sample into a small shape, so you can compare waters at a glance.

How to use it

  1. Paste or open a table with a header row. Name the ion columns Ca, Mg, Na, K, HCO3, CO3, SO4 and Cl (Ca2+, Calcium or Sulfate also work). K, CO3 and NO3 are optional.
  2. If you have alkalinity instead of bicarbonate, name the column Alk. In mg/L it is read as mg/L of CaCO₃.
  3. Choose the unit: mg/L, meq/L or mmol/L.
  4. Pick a text column (such as site or aquifer) under Colour by to colour the groups.

Blank cells and values like “<0.1” (below detection) count as zero.

What you get

  • meq/L for every ion: mg/L × charge ÷ molar mass. Piper plots use these, because charges, not masses, balance.
  • The ion balance error: (cations − anions) ÷ (cations + anions) × 100. Within about ±5 % is usually a sound analysis. A larger error is flagged, and it often means a missing ion or a units mistake.
  • The water type, naming the cations and then the anions that hold at least 20 % of their side, largest first, such as Ca-Mg-HCO₃.
  • The diamond field: one of four classic fields split at 50 %.
  • Total hardness as mg/L of CaCO₃.
  • Stiff diagrams for up to 24 samples, on one shared scale.

Worked example

All values are made up. Sample W1 has Ca 60.1, Mg 14.6, Na 18.4, K 1.95, HCO₃ 244, SO₄ 28.8 and Cl 17.7 mg/L. That is 5.05 meq/L of cations and 5.10 of anions, an ion balance of −0.5 %. Calcium and magnesium dominate the cations and bicarbonate the anions, so the tool calls it Ca-Mg-HCO₃ water with a hardness of 210 mg/L as CaCO₃.

Deep sample D1 has 207 mg/L Na and 319 mg/L Cl. It comes out as Na-Cl water and sits at the right-hand corner of the diamond, far from the shallow wells.

Good to know

  • Use complete analyses. If a major ion was not measured, the balance and the plot will be off.
  • The 20 % rule and the 50 % fields are simple conventions. Say which you used when you report a water type.

FAQ

Why is K added to Na? In the classic Piper diagram they share a corner, because potassium is usually small.

Can I plot nitrate? It counts in the ion balance and the water type, but the Piper triangles only have three anion corners, so it is left off the plot.

Where the numbers come from

  • Piper and Stiff diagram layouts, the meq/L conversion and the ion balance error: standard hydrochemistry methods, written by fibub from the definitions.
  • Molar masses from the standard atomic weights of the elements (general constants).
  • The 20 % water-type rule and the four diamond fields are common rules of thumb, stated on the page; other schemes exist.
  • Example data are made up by fibub for illustration.

Standard scientific values, such as constants, atomic weights and melting points, are facts found in every textbook; we name where ours were checked. If you are an author or publisher and want a value, a credit or a table changed or removed, tell us and we will act quickly.

Last updated 2026-11-08.

Change log for Piper diagram maker

  1. Add the Piper and Stiff diagram maker (#125) Details on GitHub

Every change to fibub

Related tools

Ternary and spider plot maker #124 Plot any three-part composition (QFL sandstones, soil texture, mineral end-members, alloys) on a ternary diagram with groups, grid lines and labels, and draw normalised multi-element spider diagrams with Eu/Eu* and (La/Yb)N. Download as PNG, PDF or Word. Isotope delta converter #122 Convert stable isotope δ values (δ²H, δ¹³C, δ¹⁵N, δ¹⁷O, δ¹⁸O, δ³⁴S, δ¹¹B, δ³⁷Cl) to and from isotope ratios, move δ¹⁸O between the VPDB and VSMOW scales exactly, work out α, ε and 1000 ln α, triple-oxygen Δ′¹⁷O, and two-source mixing with different concentrations. Pump test analyser #126 Paste or open time–drawdown readings from a pumping test. Get transmissivity T and storativity S from a Theis curve fit and the Cooper-Jacob straight line (with a check that it applies), T from recovery data, and T and S from several observation wells. Log plots, PNG, PDF and Word downloads. Mixing model calculator #123 Unmix water, sediment or rock samples into two or three sources (end-members) from several tracers at once, including δ isotope values weighted by concentration. Least-squares fractions that stay between 0 and 100 %, a misfit check and a tracer plot with curved mixing lines. Slug test analyser #127 Paste or open water level readings from a slug or bail test. Choose the fit window, get the basic time lag T0 and hydraulic conductivity K by Hvorslev, or Bouwer-Rice with your own ln(Re/R), with a filter pack correction, warnings and a semi-log plot. Darcy flow calculator #128 Groundwater flow from Darcy's law: flux, discharge, seepage velocity and travel time. Find the hydraulic gradient and flow direction from three or more wells, convert K to intrinsic permeability, and estimate K from a sieve curve (d10, Cu, Cc and Hazen). Well field drawdown #129 Add up the drawdown from several pumping or injection wells that start at different times, with an optional river or no-flow boundary. Draw a contour map at any day, follow one point over time, and find the capture zone of a well in regional flow. Solutions and dilutions calculator #30 Work out how much to weigh for a solution in M, mM, mg/mL, % w/v or ppm, how much stock to dilute, and a full serial dilution plan with volumes for every tube. CIPW norm calculator #871 Paste or open whole-rock major-oxide analyses, one or many. Get the CIPW norm in wt% (quartz, feldspars, feldspathoids, pyroxenes, olivine, oxides, apatite), the differentiation index, plagioclase An, colour index and silica saturation, with Le Maitre or fixed-ratio Fe2O3/FeO adjustment and a check that the norm adds up to the analysis.