Median Calculator

Raw list or value:count • Live results • Ajax loading • Hard reset
Live

Input data

Separators: comma, space, newline, semicolon. Frequency format: value:count (count must be positive integer).
Quick summary
Paste numbers to compute the median.

Results

Count (n)
Median
Min / Max
Updating…

Action

Hard reset: cancels pending updates and clears everything on the first click.

Important Note : Median is especially useful for skewed data or datasets with outliers because it is based on order/rank rather than the sum of all values. Penn State notes that the median is often preferred for skewed distributions or data with outliers because it is more resistant to outliers than the mean.

Use this Median Calculator to find the middle value of any numeric data set. Enter raw numbers or use value:count frequency input to calculate the median, count, minimum, maximum, and sorted preview.

The median is one of the most useful measures of center in statistics because it describes the middle position of ordered data. It is especially helpful when a data set contains outliers or is skewed, because extreme values affect the median less than they affect the mean.

Reviewed by: AjaxCalculators Editorial Team

Last updated: April 30, 2026

Method source: Standard ordered-data median definition using the middle value for odd-sized data sets and the average of the two middle values for even-sized data sets.

Editorial standards: See our Editorial Policy for how we review and update calculator content.

What This Median Calculator Does

This calculator finds the median of a numeric data set. It can calculate:

  • Median
  • Count of values, shown as n
  • Minimum value
  • Maximum value
  • Sorted preview of the data

The calculator supports both regular raw-number input and frequency-style input. For example, 12:4 means the value 12 appears 4 times.

What Is the Median?

The median is the middle value of a data set after all values are sorted from smallest to largest. It divides the ordered data into two halves: half of the values are at or below the median, and half are at or above the median.

For an odd number of values, the median is the single middle value. For an even number of values, the median is the average of the two middle values.

Median Formula

Before finding the median, sort the data from smallest to largest.

For an odd number of values:

Median = value at position (n + 1) / 2

For an even number of values:

Median = average of the values at positions n / 2 and (n / 2) + 1

Where n is the number of values in the data set.

Odd Number of Values Example

Suppose the data set is:

9, 2, 7, 4, 5

First, sort the values:

2, 4, 5, 7, 9

There are 5 values, so n = 5. The median position is:

(5 + 1) / 2 = 3

The 3rd value is 5, so the median is:

Median = 5

Even Number of Values Example

Suppose the data set is:

9, 2, 7, 4

First, sort the values:

2, 4, 7, 9

There are 4 values, so n = 4. The two middle values are in positions 2 and 3:

4 and 7

Now average the two middle values:

(4 + 7) / 2 = 5.5

So the median is:

Median = 5.5

This is why the median of an even-sized data set may be a value that does not appear in the original data.

How to Use the Median Calculator

  1. Enter your numbers into the input box.
  2. Separate values with commas, spaces, semicolons, or line breaks.
  3. Use frequency input if needed. For example, enter 10:4 to count the value 10 four times.
  4. Choose whether to show the sorted preview.
  5. Choose whether to ignore empty tokens.
  6. Review the median, count, min/max, and sorted preview in the result panel.
  7. Use the reset option to clear the calculator and start again.

Supported Input Formats

You can enter a simple list of numbers:

4, 8, 2, 10, 6

You can also separate numbers with spaces:

4 8 2 10 6

You can use semicolons:

4; 8; 2; 10; 6

You can enter each number on a new line:

4
8
2
10
6

You can also use frequency format:

5:3, 10:2, 20:1

This means the data set contains three 5s, two 10s, and one 20:

5, 5, 5, 10, 10, 20

Frequency Input Example

Suppose you enter:

2:3, 5:2, 9:1

This expands to:

2, 2, 2, 5, 5, 9

There are 6 values, so the calculator uses the two middle values. The sorted data are already:

2, 2, 2, 5, 5, 9

The two middle values are 2 and 5, so:

Median = (2 + 5) / 2 = 3.5

How to Interpret the Results

Count (n) shows how many numeric observations were included in the calculation.

Median shows the middle value after the data are sorted.

Min / Max shows the smallest and largest values in the data set.

Sorted preview shows the ordered version of the data so you can verify how the median was found.

Median vs Mean

The median and mean are both measures of center, but they behave differently.

Measure How It Is Found Best Used When
Median Middle value after sorting Data are skewed or contain outliers
Mean Sum of values divided by count Data are fairly balanced without strong outliers

For example, consider this data set:

10, 12, 13, 14, 1,000

The median is 13 because 13 is the middle value after sorting. The mean is much higher because the extreme value 1,000 pulls the average upward. In a case like this, the median often gives a better description of the typical value.

Why the Median Is Useful for Outliers

The median is based on position, not on the total sum of the data. Because of that, one very large or very small value may not change the median much.

For example:

Data set A: 10, 12, 13, 14, 15

The median is 13.

Data set B: 10, 12, 13, 14, 500

The median is still 13.

The mean would change a lot, but the median stays the same because the middle position did not change.

When to Use the Median

The median is often useful for:

  • Household income data
  • Home prices
  • Rent prices
  • Test scores with extreme values
  • Response times
  • Small data sets with one unusual value
  • Skewed distributions
  • Descriptive statistics homework

In many real-world data sets, the median gives a clearer “typical” value than the mean when extreme values are present.

When the Median May Not Be Enough

The median gives the middle value, but it does not describe the full spread or shape of the data. Two data sets can have the same median but very different ranges, variability, or outlier patterns.

For a fuller summary, consider using the median together with:

  • Minimum and maximum
  • Range
  • Quartiles
  • Interquartile range
  • Standard deviation
  • Outlier checks
  • A histogram or box plot

Median Example Table

Original Data Sorted Data Count Median
9, 2, 7, 4, 5 2, 4, 5, 7, 9 5 5
9, 2, 7, 4 2, 4, 7, 9 4 5.5
10, 12, 13, 14, 500 10, 12, 13, 14, 500 5 13
5:3, 10:2, 20:1 5, 5, 5, 10, 10, 20 6 7.5

Common Mistakes When Finding the Median

  • Not sorting the data first: the median is based on the ordered data, not the original order.
  • Using the mean instead: the mean and median are different measures.
  • Forgetting to average the two middle values: even-sized data sets require the average of the two middle values.
  • Counting repeated values only once: repeated values must be counted each time they appear.
  • Using frequency input incorrectly: value:count means the value appears count times.

Median and Percentiles

The median is also known as the 50th percentile in many contexts. That means about half of the ordered values are below it and about half are above it.

This connection is useful when working with quartiles, percentiles, IQR, and box plots. The median is the center line in many box plot summaries.

Assumptions and Limitations

  • This calculator works with numeric data only.
  • The data are sorted internally before the median is found.
  • Frequency input must use a positive integer count.
  • Empty entries may be ignored depending on the selected option.
  • The median describes the center but not the spread of the data.
  • The median may not be enough for a complete statistical summary.
  • For grouped interval data, a different grouped-median method may be needed.

Practical Uses of a Median Calculator

This calculator can help you:

  • Find the middle value of a data set
  • Summarize skewed data
  • Work with repeated values using frequency input
  • Check statistics homework
  • Prepare for quartile and IQR calculations
  • Compare median with mean
  • Understand the center of real-world data

Related Calculators

References

Frequently Asked Questions

What does a median calculator do?

A median calculator finds the middle value of a numeric data set after sorting the values from smallest to largest. It can also show the count, minimum, maximum, and sorted preview.

How do I calculate the median?

Sort the values from smallest to largest. If there is an odd number of values, choose the middle value. If there is an even number of values, average the two middle values.

What is the median of an odd number of values?

For an odd number of values, the median is the single middle value after sorting. For example, the median of 2, 4, 6, 8, 10 is 6.

What is the median of an even number of values?

For an even number of values, the median is the average of the two middle values. For example, the median of 2, 4, 6, 8 is (4 + 6) / 2 = 5.

Do I need to sort the numbers before finding the median?

Yes. The median is based on the ordered data. This calculator sorts the values internally before finding the middle position.

What does value:count mean?

Value:count is frequency input. For example, 7:3 means the value 7 appears three times in the data set.

Is the median the same as the average?

No. The median is the middle value after sorting. The average, usually called the mean, is the sum of all values divided by the number of values.

When should I use the median instead of the mean?

Use the median when the data are skewed or contain extreme outliers. The median is less affected by very large or very small values than the mean.

Can the median be a decimal?

Yes. If the data set has an even number of values, the median is the average of the two middle values, which can produce a decimal.

Does this calculator work with negative numbers?

Yes. The median can be calculated for positive numbers, negative numbers, decimals, or a mix of numeric values.

Is the median the 50th percentile?

In many statistical contexts, yes. The median is commonly interpreted as the 50th percentile because it marks the middle of the ordered data.

Disclaimer

This calculator is for educational and general statistical use only. It computes the median from numeric input using standard ordered-data rules. For formal statistical analysis, interpret the median along with sample size, spread, outliers, data collection method, and the overall shape of the distribution.

More of our calculators...

Triangle Calculator

Calculate triangle area, perimeter, angles, and side lengths using SSS, SAS, AAS/ASA, right triangle, and base-height methods.

Probability Calculator

Calculate probability, complements, conditional probability, unions, and independent events using formulas, percentages, fractions, and decimals.

Surface Area Calculator

Calculate total surface area, lateral area, and base area for common 3D shapes including cubes, spheres, cylinders, cones, and prisms.

t-statistic Calculator

Use our t-Statistic Calculator to compute the t value, degrees of freedom, and standard error for one-sample, two-sample, Welch, pooled, or paired t-tests.

t-test Calculator

Use our T-Test Calculator to compute t statistic, p-value, confidence interval, and conclusion for one-sample, Welch, pooled, or paired t-tests.

Outlier Calculator (Tukey Fences)

Use our Outlier Calculator to find low and high outliers with Tukey fences and the IQR method. Get Q1, Q3, IQR, fences, counts, and sorted data fast.

Power Analysis Calculator

Use our Power Analysis Calculator to estimate sample size per group, statistical power, and minimum detectable effect for a two-sample mean test with alpha and standard deviation.

Sample Size Calculator

Use our Sample Size Calculator to estimate sample size for a mean or proportion from confidence level, margin of error, and optional finite population correction.

Margin of Error Calculator

Use our Margin of Error Calculator to find margin of error for a mean or proportion from sample size, confidence level, and z value.