Range Calculator
Enter your data to find its range, the maximum minus the minimum. You also get the minimum, the maximum, the midrange, the range rule of thumb estimate of the standard deviation, every step of the working and a number line that shows the values between the two extremes.
The range uses only the two extreme values. For a measure of spread that ignores outliers, use the interquartile range calculator; for one that uses every value, the standard deviation calculator. For the mean, median and mode of the same data, see the mean, median and mode calculator.
Enter numbers separated by commas, spaces or new lines
Related Calculators
Standard Deviation Calculator
Calculate standard deviation, variance, and spread with clear statistical outputs.
Interquartile Range Calculator
Find the IQR with Q1, Q3, the median, and 1.5 × IQR fences via the median-split method.
Five Number Summary Calculator
Get the minimum, Q1, median, Q3, and maximum of a data set for box plots.
What the range tells you
The range is the simplest measure of spread: the distance from the smallest value to the largest. A class whose exam scores run from 64 to 95 has a range of 31 points. It is in the same units as the data and is always 0 or more, and it is 0 only when every value is the same.
Because it uses only two values, the range says nothing about how the values in between are spread out, and a single extreme value changes it completely. It is a quick first look at a data set rather than a full description of it.
Formulas
Range = maximum − minimum
Midrange = (minimum + maximum) / 2
Range rule of thumb: s ≈ range / 4
The midrange is the value halfway between the two extremes. It is a measure of the centre of the data, not of its spread, and like the range it depends on the two extreme values only. The range rule of thumb estimates the standard deviation s from the range; it is explained below.
How to read the results
| Output | What it tells you |
|---|---|
| Range | Maximum minus minimum: how far apart the two extreme values are, in the units of the data. |
| Minimum and Maximum | The smallest and the largest value in the list. |
| Midrange | The value halfway between the minimum and the maximum. |
| Number of Values (n) | How many values were read from the list. |
| Range Rule of Thumb | The range divided by 4, a rough estimate of the standard deviation for bell-shaped data with about 30 values. |
| Number line | Every value drawn between the minimum and the maximum, with a bracket for the range and a dashed line at the midrange. |
Worked example: exam scores
Eight students scored 72, 85, 91, 68, 77, 95, 88 and 64. Load example fills in these scores.
- Sort the scores (optional, but it makes the extremes easy to see): 64, 68, 72, 77, 85, 88, 91, 95.
- Find the extremes: the minimum is 64 and the maximum is 95.
- Range = 95 − 64 = 31.
- Midrange = (64 + 95) / 2 = 79.5.
- Range rule of thumb: s ≈ 31 / 4 = 7.75.
The sample standard deviation of these scores is 11.39, so the rule of thumb is low. With only eight values it has too little chance to reach the extremes: dividing by 4 works for about 30 values. Now suppose the top score were typed as 195 instead of 95. The range would jump from 31 to 131, while the interquartile range would stay at 19.5 because it ignores the extreme values.
Range, IQR or standard deviation?
| Measure | Uses | Effect of an outlier | Best for |
|---|---|---|---|
| Range | The two extreme values | Large: one outlier changes it completely | A quick look at the full spread |
| Interquartile range | The middle half of the data | Small: the outer quarters are ignored | Skewed data and data with outliers |
| Standard deviation | Every value | Moderate: large deviations count most | Roughly symmetric data and further calculations |
Report the range together with the minimum and the maximum, or with a resistant measure such as the interquartile range: on its own it hides where the values lie. The five number summary gives both extremes and the quartiles in one line, and the outlier calculator shows which values are unusually far from the rest.
The range rule of thumb
For bell-shaped data, almost all values lie within two standard deviations of the mean, so the range covers about four standard deviations and s is roughly range / 4. The rule can also be read the other way: usual values lie between the mean minus 2s and the mean plus 2s.
The rule fits samples of about 30 values. A larger sample is more likely to include values far from the mean, so its range is wider, and a smaller one has a narrower range. For a sample from a normal distribution the expected range is about 2.3 standard deviations for 5 values, 3.1 for 10, 4.1 for 30 and 5.0 for 100. Dividing by 4 therefore underestimates s for small samples and overestimates it for large ones, and it is only an estimate: use the standard deviation calculator for the actual value.
Grouped data and the range of a function
A frequency table of classes hides the individual values, so only an approximate range is possible: the upper limit of the last class minus the lower limit of the first class. The class width calculator shows how classes are chosen.
This page finds the range of a data set, a measure of spread. The range of a function, the set of all the values it can take, is a different idea and is not calculated here.
Assumptions and pitfalls
- An outlier or a typing error changes the range. Check the minimum and the maximum against the source data first.
- The range grows with the sample size. A larger sample is more likely to include extreme values, so ranges of samples of different sizes cannot be compared directly.
- The range ignores the middle of the data. Two data sets with the same range can be spread very differently between the extremes.
- Use one unit. Convert all values to the same unit before finding the range, and report the unit with it.
- The midrange is not the median. It moves with either extreme, while the median depends on the middle of the sorted data.
Range in other software
| Tool | Command |
|---|---|
| Excel / Google Sheets | =MAX(A1:A8)-MIN(A1:A8) |
| Python (NumPy) | np.ptp(a), where ptp stands for peak to peak, the maximum minus the minimum |
| Python (pandas) | s.max() - s.min() |
| R | diff(range(x)), because range(x) returns the minimum and the maximum |
| SPSS | Analyze > Descriptive Statistics > Descriptives > Options > Range |
| TI-84 | STAT > CALC > 1-Var Stats shows minX and maxX; subtract them |
Frequently Asked Questions
What is the range in statistics?
The range is the difference between the largest and the smallest value in a data set: range = maximum - minimum. It measures how far apart the extremes are, in the units of the data. It uses only two values, so it is quick to find but sensitive to outliers.
How do I find the range of a data set?
Find the smallest and the largest value, then subtract the smallest from the largest. For 72, 85, 91, 68, 77, 95, 88 and 64 the smallest is 64 and the largest is 95, so the range is 95 - 64 = 31. Sorting the values first makes the extremes easy to spot.
Can the range be negative?
No. The maximum is never smaller than the minimum, so the range is 0 or more. It is 0 when all values are the same. A data set with negative values still has a positive range: for -5, 0 and 3 the range is 3 - (-5) = 8.
What is the midrange, and how is it different from the range?
The midrange is the average of the minimum and the maximum, (minimum + maximum) / 2, the value halfway between the extremes. It describes the centre of the data, while the range describes its spread. Both use only the two extreme values, so both change when an outlier is added.
Why is the range sensitive to outliers?
The range is built from the largest and the smallest value only, so one unusual value defines it. If a top score of 95 is typed as 195, the range of the exam scores jumps from 31 to 131, while the interquartile range stays the same. For data with outliers, use the interquartile range or the standard deviation.
What is the range rule of thumb?
The range rule of thumb estimates the standard deviation as the range divided by 4: s is about (maximum - minimum) / 4. It follows from almost all values of bell-shaped data lying within two standard deviations of the mean. It works best for about 30 values and is only a rough estimate; use the standard deviation calculator for the actual value.
How do I find the range from a frequency table or grouped data?
For a table of single values, subtract the smallest value from the largest one that has a frequency above 0. For grouped data in classes the individual values are not known, so subtract the lower limit of the first class from the upper limit of the last class: the result is an approximate range.
Is this the range of a function?
No. This calculator finds the range of a data set, which measures how spread out the values are. The range of a function is the set of all the output values the function can produce, which is a different concept from algebra.
Embed This Calculator
Add this free calculator to your course page or LMS.
Adjust the height value to fit your page.