gizmobench

Range Calculator

This page opens the average calculator with the range as its headline figure instead of the mean. The range is the distance between the two ends of a list: the largest value minus the smallest. On a first visit the box arrives filled with twelve numbers, 18, 22, 31, 39, 44, 46, 51, 58, 62, 70, 76 and 83, so the answer reads 65 under the label Range · 12 values, and the line beneath it prints the subtraction it did: Largest − smallest = 83 − 18 = 65. Paste your own numbers over the sample and that line follows them, naming the largest and the smallest it found rather than only handing back a difference. A negative smallest is bracketed, as in 5 − (−8) = 13, so the double negative can be read. Underneath, the mean, median, mode, both standard deviations, both variances, the geometric and harmonic means and the sum stay on screen, each with its own arithmetic written out, because the range alone is decided by two values and tells you nothing about the ones between them.

Range · 12 values65Largest − smallest = 83 − 18 = 65
What to work out
Values
Sample or population
Count
12

Commas, spaces, tabs, semicolons and new lines all separate values, so a column pasted straight out of a spreadsheet works. Currency symbols, percent signs and accounting parentheses are understood; anything left over is listed rather than silently dropped.

  • Meansum ÷ count
    50

    (18 + 22 + 31 + … + 83) ÷ 12 = 600 ÷ 12 = 50 The arithmetic mean: the one most people mean by “average”.

  • Medianthe middle of the sorted list
    48.5

    Sorted: 18, 22, 31, …, 83, an even count (12), so the median is the average of the 6th and 7th values: (46 + 51) ÷ 2 = 48.5

  • Modeno value repeats
    None

    All 12 values appear exactly once, so nothing is more common than anything else: there is no mode. No mode is a real answer, not a failure. Adding a repeat would create one.

  • Rangelargest − smallest
    65

    Largest − smallest = 83 − 18 = 65

  • Standard deviation (sample)divides by n − 1 · your choice
    20.705730432111608

    √(sample variance) = √428.72727272727275 = 20.705730432111608 Divides by n − 1. Use this when your numbers are a sample drawn from something larger.

  • Variance (sample)divides by n − 1 · your choice
    428.72727272727275

    Σ(x − mean)² ÷ (n − 1) = 4716 ÷ 11 = 428.72727272727275 Divides by n − 1. Use this when your numbers are a sample drawn from something larger.

  • Standard deviation (population)divides by n
    19.82422760159901

    √(population variance) = √393 = 19.82422760159901 Divides by n. Use this when your numbers ARE the whole group.

  • Variance (population)divides by n
    393

    Σ(x − mean)² ÷ n = 4716 ÷ 12 = 393 Divides by n. Use this when your numbers ARE the whole group.

  • Geometric meanfor growth rates and ratios
    45.487558964974305

    (18 × 22 × 31 × … × 83)^(1/12) = 45.487558964974305 The geometric mean: the right average for growth rates, ratios and anything that multiplies.

  • Harmonic meanfor speeds and other per-unit rates
    40.56169143061571

    12 ÷ (1/18 + 1/22 + … + 1/83) = 12 ÷ 0.29584565082861597 = 40.56169143061571 The harmonic mean: the right average for speeds, rates and other per-unit quantities.

  • Sumevery value added up
    600

    18 + 22 + 31 + … + 83 = 600

Sample or population is not a formatting choice. Sample divides by n − 1, population by n, and on eight numbers the two answers differ by about 7%. Use sample when your numbers are a subset of something larger, which is almost always. A tool that shows one of them and calls it “standard deviation” has picked for you without saying so. Both are above, each labelled with the divisor it used.

Common questions

How do you find the range of a set of numbers?
Take the largest value, subtract the smallest, and the difference is the range. No sorting or grouping is needed first. The twelve numbers this page opens with are a worked example: the largest is 83, the smallest is 18, and the line under the big figure reads Largest − smallest = 83 − 18 = 65. That line is why the working is printed rather than just the answer: it names both ends, so you can see which two values decided the figure and check the subtraction rather than take it on trust.
Can the range be zero, and can it ever be negative?
Zero, yes: paste 5, 5, 5 and every value sits at the same place, so the figure reads 0 with the working 5 − 5 = 0. A single number is the same case, and it says so in as many words: the working reads 7 − 7 = 0 with the note that one value has nothing to spread across, so the range is 0. Negative, never, because the smallest is always subtracted from the largest, in that order. A negative answer would mean the two had been swapped.
How do you work out the range when the numbers are negative?
The same subtraction, which is where a minus sign in front of the smallest value trips people up. For -8, -3, 0 and 5 the range is 13, not 3, because subtracting a negative adds: the line reads Largest − smallest = 5 − (−8) = 13, with the negative value bracketed so the two minus signs cannot be misread as one. Accounting parentheses are understood on the way in as well, so a column holding (250) and 400 is read as -250 and 400, giving a range of 650.
Is this the same as the interquartile range?
No. This is the full range, the whole distance from the smallest value to the largest, so a single unusual value at either end sets it on its own. The interquartile range is the distance between the first and third quartiles and deliberately ignores the ends, and this page does not compute quartiles, so it cannot give you one. What it does give you on the same screen is the other way of describing spread: both standard deviations and both variances, which use every value rather than two of them, sit in the list below the range and each shows its division.
How do I get my own numbers in, and does a spreadsheet column work?
Select what is in the box and paste over the top. Commas, spaces, tabs, semicolons, pipes and new lines all separate values, so a column copied straight out of a spreadsheet goes in as it is. Currency symbols, percent signs and accounting parentheses for negatives are read off first, so $1,200, $980 and $1,450 give a range of 470, with a note saying the comma in $1,200 was read as grouping thousands and how to write it if you meant two numbers. A pair like 3,14 is read the other way, as 3 and 14, and says so. Anything that is not a number at all is skipped and quoted above the results rather than quietly counted as zero. This page always opens on the range, even if you last chose a different statistic or last used the weighted mean, because the page you asked for wins. Your last list of numbers does come back, so you can carry on where you left off.
What else is worked out at the same time, and can the range be missing?
Every row is computed on each paste: mean, median, mode, range, standard deviation and variance for both sample and population, geometric mean, harmonic mean and sum, each with its arithmetic under it and a Copy button, plus a Copy all button that puts the whole list and its working on the clipboard. The Featured result menu holds those nine statistics, and switching it moves another one into the big figure. The range is missing in one case only: when the gap between the smallest and largest value is wider than a browser can hold, past about 1.8 × 10^308, the row reads Not defined and gives that reason instead of printing infinity. Float dust is trimmed elsewhere, so 0.3 − 0.1 reads 0.2 rather than 0.19999999999999998.

Exact for median, mode, minimum, maximum and range. The mean, variances and standard deviations use compensated summation and are accurate to roughly 15 significant digits, not claimed as exact, because double-precision arithmetic is not.