← All how-to recipes

How to calculate the range (max minus min)

✓ Verified in LibreOffice 25.8.7.3 ✓ Verified in Google Sheets (2026-08-30)

The spread of a data set — highest value minus lowest. A one-number measure of variability.

The formula

AppFormulaNotes
Excel (desktop)=MAX(A2:A6)-MIN(A2:A6)Conditional range: =MAXIFS(...)-MINIFS(...). For range ignoring outliers, see percentile-based spread.
Google Sheets=MAX(A2:A6)-MIN(A2:A6)Identical.
LibreOffice Calc=MAX(A2:A6)-MIN(A2:A6)Identical.

How it works

The statistical range is simply the largest value minus the smallest: 45 - 7 = 38. It's the quickest gauge of how spread out numbers are, but it only sees the two extremes, so a single outlier dominates it — for a sturdier spread use standard deviation or the interquartile range (QUARTILE(...,3)-QUARTILE(...,1)). For a range within categories, swap in MAXIFS and MINIFS with your condition.

Verified, not just documented

We ran =MAX(A2:A6)-MIN(A2:A6) in LibreOffice 25.8.7.3 (headless, with forced recalculation) and it returned 38 — exactly the expected result. We then ran the same formulas in Google Sheets, executed 2026-08-30: a formula-only workbook goes into Google Drive, which converts it to a Sheet and recalculates every formula with Google’s own engine, and comes back out as .xlsx carrying the values Google computed. It returned 38 for the worked example, the same value LibreOffice produced. Both engines’ numbers on this page are executed results. The Excel formula follows Microsoft’s official documented syntax — we do not run desktop Excel.

Functions used

MAX · MIN — see full Excel, Google Sheets & LibreOffice compatibility for each.

Related recipes

Related comparisons