Statistics Calculator

Mean Median Mode Calculator

A clear view of your dataset.

Enter your data

Exact statistics.

Separate signed decimals, scientific e notation or integer fractions with commas, spaces, semicolons, pipes or new lines. Decimal point only; commas separate values, never thousands.

Each method keeps its own data. Frequency counts represent repeated observations, not arbitrary weights.

Conventions and display

A literal label only; all observations must already use the same measurement unit. No unit conversion is performed.

Changes the first and third quartiles and the interquartile range. Mean, median, mode and range stay unchanged.

Choose whether a highest-frequency tie at one occurrence is reported as no repeated mode or as all tied values.

Exact rational answers do not change. Tiny nonzero views use scientific notation. Halfway values round away from zero.

Imports into the selected method. Files must be UTF-8, at most 64 KiB, and contain only supported numeric data plus an optional frequency header. Invalid files leave current data unchanged.

Worked datasets

Supports up to 2,0002{,}000 source observations or frequency rows, and total count n≤109n\leq10^9. Nonzero source magnitudes range from 10−10010^{-100} through 1010010^{100}, with forty significant digits per number. Combined exact arithmetic is bounded to 1,5001{,}500 numerator or denominator digits. Results describe the supplied data; no missing values or outliers are removed automatically.

5 observations; 4 distinct exact values. Unimodal.

Arithmetic mean

55

≈5\approx 5points

Center, extent and quartile summary

Arithmetic mean

55≈5\approx 5points

Median

44≈4\approx 4points

Sum

2525≈25\approx 25points

Minimum

22≈2\approx 2points

Maximum

99≈9\approx 9points

Range

77≈7\approx 7points

Midrange

112\frac{11}{2}≈5.5\approx 5.5points

First quartile

33≈3\approx 3points

Third quartile

152\frac{15}{2}≈7.5\approx 7.5points

Interquartile range

92\frac{9}{2}≈4.5\approx 4.5points
Observation count
55
Distinct exact values
44
Highest frequency
22
Zero-frequency rows excluded
00

Mode and repeated-value convention

Unimodal

  • 44≈4\approx 4points

Mode compares exact numerical values, without rounding or clustering nearby measurements. It is the observed sample mode, not an estimate of the peak of a continuous population distribution.

Step-by-step solution

  1. 1. Validate and count observations

    All active tokens are checked before arithmetic. Equivalent fractions and decimals share one exact value; zero-frequency rows are excluded explicitly.

    n=∑jfj=5,u=4n=\sum_j f_j=5,\quad u=4
  2. 2. Sort and retain multiplicities

    Values are sorted by exact numerical comparison. Frequency rank intervals retain every observation without expanding large counts.

    x(1)=2,x(5)=9x_{(1)}=2,\quad x_{(5)}=9
  3. 3. Add the weighted value total

    Each multiplicity counts repeated observations, rather than an arbitrary reliability or probability weight. Unrounded rational terms are added exactly.

    S=(2)⋅1+(4)⋅2+(6)⋅1+(9)⋅1=25S=\left(2\right)\cdot1+\left(4\right)\cdot2+\left(6\right)\cdot1+\left(9\right)\cdot1=25
  4. 4. Divide the total by the count

    The arithmetic mean uses every observation. Cancellation and rounding do not alter the exact numerator or denominator.

    xˉ=Sn=(25)5=5\bar{x}=\frac{S}{n}=\frac{\left(25\right)}{5}=5
  5. 5. Locate the middle rank or pair

    The odd observation count selects one middle rank in sorted order.

    M=x(3)=4M=x_{(3)}=4
  6. 6. Identify the greatest observed frequency

    Unimodal. The selected convention requires a frequency greater than one.

    fmax⁡=2,#modes⁡=1f_{\max}=2,\quad \#\operatorname{modes}=1
  7. 7. Compare range and the selected quartiles

    Quartiles are the medians of the lower and upper halves, excluding the overall median for an odd count. A singleton repeats its only value.

    R=9−(2)=7,Q1=3,Q3=152,IQR=92R=9-\left(2\right)=7,\quad Q_1=3,\quad Q_3=\frac{15}{2},\quad \mathrm{IQR}=\frac{9}{2}

Sorted values and frequency audit

Each row represents an exact distinct value with all its repetitions. First and last ranks locate observations in the fully sorted dataset. Equivalent decimals and fractions are combined. Percentages use the unrounded total count.

Showing distinct rows 1–4 of 4. Print includes this page; CSV includes every row.

ValueFrequencyCumulative countSorted rank intervalRelative frequencyPercentCumulative percentMode
Value22≈2\approx 2points11111115\frac{1}{5}≈0.2\approx 0.2≈20%\approx 20\%≈20%\approx 20\%—
Value44≈4\approx 4points22332 through 32\text{ through }325\frac{2}{5}≈0.4\approx 0.4≈40%\approx 40\%≈60%\approx 60\%Modal value
Value66≈6\approx 6points11444415\frac{1}{5}≈0.2\approx 0.2≈20%\approx 20\%≈80%\approx 80\%—
Value99≈9\approx 9points11555515\frac{1}{5}≈0.2\approx 0.2≈20%\approx 20\%≈100%\approx 100\%—
What Can You Create?

Understand the center without losing the observations

An arithmetic average with an exact audit

The sum is calculated before division, with exact fractions retained through each operation. This matters when small values sit beside very large positive and negative observations. The resulting mean is therefore tied to the supplied data rather than to the order in which a floating-point accumulator happened to add them. A separate rounded view remains convenient for a worksheet or concise report.

A median based on actual sorted ranks

The calculator distinguishes a middle position from the numerical value stored at that position. An even count uses both central observations and averages their values. Frequency rows preserve the same rank logic through cumulative intervals, so a compressed table can describe a large sample without changing its median. Close exact values remain in the right order even when their rounded displays look identical.

Every observed mode, with a visible convention

Tied maximum counts produce a complete set of modal values. The repetition selector makes the all-distinct case explicit instead of presenting conflicting textbook conventions as an arithmetic error. Equivalent rational sources share a frequency, while nearby but different values stay separate. The frequency audit connects each mode back to its count and identifies whether the dataset is unimodal, bimodal or has a larger tie.

Mean, median and frequency formulas with a worked dataset

n=∑j=1ufj,xˉ=∑j=1ufjvjnn=\sum_{j=1}^{u}f_j,\qquad\bar{x}=\frac{\sum_{j=1}^{u}f_jv_j}{n}M={x((n+1)/2),n odd,x(n/2)+x(n/2+1)2,n even.M=\begin{cases}x_{((n+1)/2)},&n\text{ odd},\\\dfrac{x_{(n/2)}+x_{(n/2+1)}}{2},&n\text{ even}.\end{cases}M={vj:fj=max⁡kfk},R=x(n)−x(1),IQR=Q3−Q1\mathcal{M}=\{v_j:f_j=\max_k f_k\},\qquad R=x_{(n)}-x_{(1)},\qquad\mathrm{IQR}=Q_3-Q_1

Here vjv_j is a distinct observed value, fjf_j is its repetition count, uu is the number of distinct values, and x(r)x_{(r)} is the observation at sorted rank rr. The repeated-mode convention additionally requires max⁡jfj>1\max_j f_j>1. For 2,4,4,6,92,4,4,6,9, the sum is 2525, the count is 55, the mean is xˉ=25/5=5\bar{x}=25/5=5, the median is M=x(3)=4M=x_{(3)}=4, and the only mode is 44 with frequency 22.

For 1,3,5,71,3,5,7, the two central values are x(2)=3x_{(2)}=3 and x(3)=5x_{(3)}=5, so M=(3+5)/2=4M=(3+5)/2=4. No value repeats. Under exclusive median-of-halves quartiles, Q1=2Q_1=2 and Q3=6Q_3=6. Linear interpolation uses h=1+(n−1)ph=1+(n-1)p and gives Q1=2.5Q_1=2.5 and Q3=5.5Q_3=5.5 for the same data.

Why Users Love This Tool

Why the source representation and definitions stay visible

The active data is checked first

  • Invalid tokens and missing punctuated cells never become zero or disappear silently.
  • Both editors retain their buffers, and only the active method enters the calculation.
  • Nonnegative integer frequencies represent repetitions, with zero-count exclusions reported.
  • Numerical sorting and duplicate detection use exact values rather than rounded labels.

Different conventions remain reviewable

  • Mode repetition and quartile methods are selected explicitly and preserved in exports.
  • Known source strings, effective count and rank intervals remain distinct quantities.
  • Exact rational results stay separate from decimal display precision.
  • Paged rows reduce browser work while copying and CSV retain the complete frequency audit.
Perfect For

Useful for learning, teaching and checking numerical summaries

Students comparing three meanings of center

A dataset with an extreme observation can have a mean far from its median and mode. Use the worked examples to compare these measures without deleting the observation that creates the difference. Follow the sorted ranks and exact sum before interpreting the result. The best description of a dataset depends on the question, its distribution and how the observations were collected, not just on which output is easiest to calculate.

Teachers demonstrating boundary cases

Move between odd and even counts, a singleton, a complete frequency tie and two genuinely tied modes. Compare the three quartile conventions on the same retained dataset, then switch to an equivalent frequency representation. Exact decimal and fraction examples help separate data interpretation from rounding behavior. The ordered mathematical working and full frequency export support a reproducible explanation rather than an isolated answer with no visible source assumptions.

People checking small numerical datasets

Paste a supported list or local file to check an arithmetic total, inspect repetitions and identify middle observations. A custom unit label keeps the numerical summary connected to a shared measurement unit without pretending to convert mixed units automatically. The result describes the supplied sample only. Population inference, missing-data treatment, grouped-class estimates and arbitrary-weight models require additional assumptions that this observation-count calculator does not invent.

How It Works

How it works in three quick steps.

1

Choose a raw list or a frequency representation

Paste one numerical dataset into the raw editor, or supply value and whole-number frequency rows. A local CSV or text file can populate the selected editor. Check the decimal-point convention, source unit and active method before proceeding. Each input method retains its own buffer, and invalid observations are reported instead of being dropped or truncated silently.

2

Review exact results and the selected definitions

Read the arithmetic mean, median and all modal values alongside the count, sum and range. Choose the mode convention and quartile method explicitly. Follow the ordered working and inspect the sorted frequency rank intervals to identify the observations behind the median. Decimal precision changes the rounded view while the exact rational certificates remain unchanged.

3

Retain the complete dataset audit

Compare the full sorted frequency table through its pages. Copy or download the calculation to preserve every distinct value, multiplicity and modal flag, including rows hidden from the current view. Share the active dataset when the encoded link fits the size limit. Before printing a PDF, choose the visible working and frequency page that you want included.

Download & Print

Keep a complete, reproducible calculation record

Copy readable exact working

The copied summary keeps the chosen quartile and mode definitions alongside every summary statistic, the complete mode set and ordered calculation steps. Mathematical expressions become readable plain text because a clipboard destination may not support visual typesetting. The sorted frequency representation is included in full, so the copied record remains useful even when only one page of rows was visible in the browser.

Download the full frequency audit

CSV retains the literal active source, exact numerical outputs, rounded views, counts and rank intervals. Relative frequencies are calculated from the unrounded count, and modal values are marked on every matching row. Display switches and pagination do not truncate this export. Formula-like source strings and unit labels are protected against spreadsheet execution. Save the file before editing the data if you need a record of the earlier calculation.

Print the current review view

Use the browser's PDF destination to save a mathematical record with accessible typeset values, the visible ordered working and the currently selected frequency page. Editing controls and supporting article sections are removed from print. Choose the relevant frequency page before printing; CSV remains the complete representation for larger tables. Long certificates receive an explicit CSV notice so a very large fraction cannot silently run beyond the printable width.

FAQ

Frequently Asked Questions

What is the difference between mean, median and mode?
The arithmetic mean divides the sum by the number of observations. The median uses the middle observation, or the average of the central pair, after sorting by numerical value. Mode identifies the most frequent observed values under the chosen repetition convention. These statistics answer different questions about the same dataset. The calculator retains count, sum, exact values and frequency rank intervals so each interpretation can be checked against its actual source data.
Why can a dataset have no repeated mode or several modes?
The default classroom convention reports no repeated mode when each distinct value occurs once. When multiple values share the greatest frequency above one, all of them are reported, including a complete tie between repeated values. The alternative maximum-frequency convention also lists ties at frequency one. Both choices are explicit. Neither approach groups nearby measurements into bins or estimates the most likely value of a continuous population from a smoothed distribution.
Are equivalent fractions and decimals counted as the same value?
Yes. Each supported number is reduced to an exact rational value before comparison or frequency aggregation. Thus 1/21/2, 0.50.5 and 5×10−15\times10^{-1} represent one numerical value even though the source strings differ. Negative zero is combined with zero. Distinct exact values are never merged just because their rounded display is identical, which preserves close measurements and observations beyond the consecutive-integer accuracy of ordinary floating-point numbers.
How do value and frequency rows affect the median?
A frequency is a nonnegative whole-number multiplicity, so a row represents that many repeated observations. The mean uses the value multiplied by its count, and the median uses ranks in the implied expanded dataset. The implementation looks up cumulative rank intervals without allocating that expanded list. Zero-frequency rows are excluded explicitly. Fractional probability weights, reliability weights and grouped class intervals are different models and are rejected rather than silently reinterpreted as observation counts.
Why do different quartile methods produce different answers?
Finite datasets admit several established quartile conventions. Median-of-halves methods differ on whether an odd dataset's overall median belongs to both halves. Linear interpolation instead uses the one-based position h=1+(n−1)ph=1+(n-1)p, with quartile probabilities p=1/4p=1/4 and p=3/4p=3/4. This page exposes all three methods and defines a singleton's quartiles as its only value. Changing this selector alters the quartiles and interquartile range while leaving mean, median, mode and range unchanged.
Does the calculator remove outliers or missing values?
No observations are removed automatically. The mean uses every positive-frequency observation, including extreme values; the median depends on sorted middle ranks, and the range uses the endpoints. Empty punctuated cells, text tokens, undefined numbers and unsupported notation are validation errors. If a real observation is missing, choose and document a defensible data-handling policy before entering the dataset. A blank value is never assumed to mean zero or a value that may be safely discarded.
Which separators and number formats can I paste?
The raw editor accepts signed decimals, scientific e notation and integer fractions, separated by commas, whitespace, semicolons, pipes or line breaks. The decimal separator is a point. Commas always separate observations, so a thousands-formatted number must first have its grouping comma removed. Simple quoted numeric CSV cells are accepted. The frequency editor expects exactly two cells per line and optionally accepts the header value,frequency; a general multi-column spreadsheet is not automatically guessed into a dataset.
How are calculations and decimal rounding kept accurate?
Source values, numerical comparisons, sums, arithmetic means, median averages and quartile interpolation use exact integer fractions. This preserves cancellation and avoids turning a finite decimal source into its binary floating-point approximation. Decimal views round halfway cases away from zero, at the selected number of places. Nonzero values that would round to zero use scientific notation. Exactness refers to the supplied numerical values, not to the measurement accuracy or representativeness of the original observations.
What are the dataset and sharing limits?
The calculator supports up to two thousand raw observations or frequency rows, with a total frequency of one billion. Source text and local files are bounded, and unusually large combined fraction numerators or denominators produce an explicit arithmetic-limit message. Frequency datasets are never expanded to a billion array entries. Shareable links have a separate encoded-size limit; when that limit is exceeded, full copying and CSV export remain available so a large dataset is not silently shortened.
What do copying, CSV and printed PDFs include?
Copying retains the selected methods, exact and rounded summaries, all modal values, ordered working and the complete sorted frequency representation. CSV also retains the literal active source, unit label, rank intervals and relative-frequency information, including rows hidden by pagination or display switches. Browser printing includes the visible result, working and current frequency page. Long exact expressions point to CSV to keep the printout readable. The local import reads a file in the browser without uploading the dataset.
About This Tool

A numerical summary should still explain which data it describes

Mean, median and mode compress a dataset in three different ways. The arithmetic mean balances the numerical total across all observations. The median is located through sorted ranks, while the observed mode describes repeated exact values. Their differences can be informative rather than contradictory. An extreme observation changes the arithmetic total and can shift the mean considerably, while the central sorted ranks may stay at the same values. A frequency tie says something different again: the supplied data has no single most frequent observed value under the selected definition.

This page treats a frequency row as a compact description of repeated observations. It does not treat arbitrary reliability or probability weights as whole observations, infer a grouped interval's unknown internal values, or guess that a missing item was intended to be zero. Exact rational parsing gives equivalent decimal and fraction sources the same numerical identity. It also preserves small differences between large values and retains cancellation when large positive and negative terms surround a much smaller observation. Those arithmetic guarantees apply to the entered numbers, independently of how well the measurements represent a population.

The working and frequency audit are designed to make the compression reversible enough to inspect. Cumulative counts identify the ranks behind the median; each distinct value keeps its multiplicity; the total and count determine the mean; and modal flags identify every maximum-frequency tie. Quartile methods remain explicit because finite-sample conventions can disagree without either computation being internally wrong. Display precision affects only a separately labelled numerical view. Together, the exact summaries, active source record and complete exports help a learner or reviewer follow an answer back to the numerical dataset that produced it.

Editorial Transparency

Who maintains this page

Ownership and review

Written and maintained by the Toolarithm editorial team. No review date is shown without a maintained editorial record. No independent professional review is claimed.

Methodology

Equations are checked by substituting worked examples into the stated relationship and comparing the result with the interactive implementation.

Read the editorial methodology

Dates and sources

Review dates change only after a substantive method or content check.

Keep building

Explore more calculators

Calculators hub