Home / Science / Earth sciences / Geochemistry and geochronology / Mixing model calculatorTool #123

End-member mixing model calculator: source fractions from tracers and isotopes (2 or 3 sources)

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.

Keep it one tap away for everyday use.

Bookmark Mixing model calculator?

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

  1. Sources
  2. Samples
  3. Unmix
  4. Fractions
Nothing is uploadedWorks offline once open

End-members (sources)

Samples

Columns named like d18O, δ13C or delta2H are treated as δ values. A δ mixes in proportion to how much of its element each source carries: for δ¹³C of dissolved carbon, weight it by the carbon concentration column. For δ¹⁸O of water itself, leave "no weighting". The example data are made up.

Source fractions

Fractions are by amount of mixture (for water, by volume). The tool finds the fractions that best match all tracers at once, scaling each tracer by its spread between the sources, and keeps every fraction between 0 and 100 %. A sample outside the sources' triangle (or beyond the ends of the line) is marked: it needs another source, or one tracer is not behaving conservatively.

Download

What it does

A stream after rain is a blend of rainwater, water from the soil and groundwater. A sediment is a blend of material eroded from different rocks. If each source has its own fingerprint, such as chloride, sulfate or an isotope ratio, you can work backwards from a sample to how much of each source it holds. That is an end-member mixing model.

For simple tracers the mass balance is linear: the sample’s value is the fraction-weighted average of the sources. Isotope δ values are different. They mix in proportion to how much of the element each source carries, so a source rich in carbon pulls δ¹³C towards itself and the mixing line curves. This tool handles both kinds together.

How to use it

  1. Paste or open the sources: a header row of tracer names, then one row per source with its name and values. Use two or three sources.
  2. Paste or open the samples with the same tracer columns. Thousands of rows are fine.
  3. If you have δ columns (named like d18O, δ13C or delta2H), choose which concentration column they should be weighted by, or none. For δ¹⁸O and δ²H of the water itself, use none. For the δ¹³C of dissolved carbon, weight it by the carbon concentration.
  4. Pick two tracers for the plot.

What you get

  • A table of fractions for each sample, as percentages that add up to 100.
  • A misfit for each sample: the root mean square of the tracer errors, each divided by that tracer’s spread between the sources. With more tracers than strictly needed (for three sources you need two), the misfit tells you whether the sources really explain the sample.
  • A note when a sample sits outside the sources’ triangle (or beyond the ends of a two-source line). The tool then gives the closest possible mix and shows the unbounded fractions, which go below zero. That usually means a missing source or a tracer that reacts rather than simply mixing.
  • A plot of two tracers with the sources and the mixing lines between them, curved where δ weighting applies.

Worked example

All numbers are made up. The three sources are rain (Cl 1, SO₄ 2, δ¹⁸O −12 ‰), soil water (15, 40, −8 ‰) and groundwater (60, 10, −5 ‰).

Stream 1 has Cl 35, SO₄ 17 and δ¹⁸O −7.25 ‰. The tool gives 20.1 % rain, 28.8 % soil water and 51.1 % groundwater, with a misfit of 0.003. Three tracers for three sources leave one check, and this sample passes it easily.

Change Stream 1’s δ¹⁸O to −13 ‰, lighter than any source. The tool marks the sample as outside and gives the nearest mix it can.

Good to know

  • Tracers must be conservative: they mix without being added or removed by reactions. Chloride and water isotopes usually are; nitrate and sulfate often are not.
  • Sources vary in real life. If their values are uncertain, try the edges of their ranges to see how much the fractions move.
  • With noisy data and nearly identical sources, fractions can swing a lot. Choose tracers that separate the sources well.

FAQ

Can I use four sources? This tool stops at three, which is where a single plot can still show the result. Four sources need at least three good tracers and a more careful statistical treatment.

Why do my fractions sum to exactly 100 %? That is built in: the mixture contains only the sources you listed.

Where the numbers come from

  • End-member mixing analysis and isotope mass balance: standard hydrology and geochemistry methods, written from the mass-balance equations.
  • 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 Mixing model calculator

  1. Add the mixing model calculator (#123) Details on GitHub

Every change to fibub

Related tools

Piper diagram maker #125 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. Radiometric age calculator #121 Work out rock and mineral ages from isotope ratios: daughter/parent ages for Rb-Sr, Sm-Nd, Lu-Hf, Re-Os, U-Pb and Th-Pb, K-Ar and ⁴⁰Ar/³⁹Ar ages, isochrons fitted with errors in both axes (York regression, MSWD), and U-Pb ages with concordance on a concordia plot. 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. 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). 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. Uncertainty propagation calculator #25 Type your formula and your measurements with their uncertainties, or paste repeated readings. Get the result with its uncertainty, which input matters most, and a Monte Carlo check.