Skip to content
πŸ› οΈToolsShed

Statistics Calculator

Calculate mean, median, mode, standard deviation, variance, and more.

About this tool

The Statistics Calculator gives you a complete descriptive summary of a list of numbers in one place, computing the mean, median, mode, standard deviation, variance, range, and more. It solves the tedium of working out each statistic separately, which is slow and error-prone when you just want an overview of your data.

Paste or type your numbers, and the calculator reads back the mean, median, mode, standard deviation, variance, and range together so you can see them side by side. It is handy for homework, lab data, a quick analysis of a small data set, or double-checking the results from a spreadsheet.

One tip: where population and sample measures differ, the calculator reports both, so pick the one that matches whether your numbers are the whole population or just a sample. Everything runs locally in your browser, so your data never leaves your device.

Frequently Asked Questions

Code Implementation

import statistics

data = [4, 8, 6, 5, 3, 2, 8, 9, 2, 5]

# Mean
print(statistics.mean(data))          # 5.2

# Median
print(statistics.median(data))        # 5.0

# Mode (raises StatisticsError if no unique mode)
print(statistics.mode(data))          # 2 (or 5 or 8, first found)
print(statistics.multimode(data))     # [2, 5, 8] (Python 3.8+)

# Standard deviation (sample)
print(statistics.stdev(data))         # 2.394...

# Standard deviation (population)
print(statistics.pstdev(data))        # 2.272...

# Variance (sample)
print(statistics.variance(data))      # 5.733...

# Quartiles (Python 3.8+)
q = statistics.quantiles(data, n=4)
print(q[0], q[1], q[2])              # Q1, Q2, Q3

Comments & Feedback

Comments are powered by Giscus. Sign in with GitHub to leave a comment.