How the Calculations Work
Every formula the calculator uses is on this page, in the order the results appear on screen. Where a method could reasonably be done in more than one way, the calculator names the method it used, so a result can always be compared with your own notes.
Mean
Formula: x̄ = Σx ÷ n
Add every value together, then divide by how many values there are.
Example: For 12, 15, 15, 18, 20 the sum is 80 and there are 5 values, so the mean is 80 ÷ 5 = 16.
Median
Formula: middle value of the sorted data
Sort the values from smallest to largest. An odd count gives one middle value; an even count gives two, and their average is the median.
Example: For 1, 2, 3, 4 there is no single middle value, so the median is (2 + 3) ÷ 2 = 2.5.
Mode
Formula: the value with the highest frequency
Count how often each value appears. The most frequent value is the mode; if two or more tie, the dataset is bimodal or multimodal, and if nothing repeats there is no mode.
Example: For 1, 2, 2, 3, 3, 4 the values 2 and 3 both appear twice, so the dataset is bimodal with modes 2 and 3.
Range
Formula: Range = maximum − minimum
Subtract the smallest value from the largest, keeping the signs of any negative numbers.
Example: For −5, −10, 3, 7 the maximum is 7 and the minimum is −10, so the range is 7 − (−10) = 17.
Quartiles and IQR
Formula: IQR = Q3 − Q1
Split the sorted data at the median, treat each half as its own dataset, and take the median of each half. The interquartile range is the difference between them and covers the middle half of the data.
Example: For −10, −5, 0, 5, 10 the quartiles are −5, 0 and 5, so the IQR is 5 − (−5) = 10.
Standard deviation and variance
Formula: σ = √(Σ(x − μ)² ÷ N) s = √(Σ(x − x̄)² ÷ (n − 1))
Measure how far each value sits from the mean, square those distances, average them for the variance, then take the square root for the standard deviation. The population formula divides by N; the sample formula divides by n − 1.
Example: For 2, 4, 4, 4, 5, 5, 7, 9 the mean is 5, the population variance is 4 and the population standard deviation is 2.
Percentile
Formula: position = (p ÷ 100) × (n − 1)
Find the position of the percentile in the sorted data, then interpolate between the neighbouring values. The method is stated on every result.
Example: For 12, 15, 15, 18, 20 the 75th percentile sits at position 3, so P75 = 18.
Methods the calculator states on the result
- Quartiles: the median-of-halves method. When the count is odd the median is part of both halves, following Tukey’s hinges.
- Percentiles: linear interpolation, using position = (p ÷ 100) × (n − 1).
- Grouped data: class midpoints for the estimated mean, with the median, Q1 and Q3 interpolated inside their class.
- Outliers: the 1.5 × IQR rule, built from the quartiles rather than from the mean.
Population or sample?
The population variance divides the squared distances from the mean by N, the full count. The sample variance divides by n − 1, which corrects for the fact that a sample estimates a wider group. The calculator shows both, and the sample figures need at least two values.