CalculationTime

Median Calculator

Find the middle value of a small number set, with the sorted order, count and even-number averaging rule kept visible.

Live math canvas

Your numbers, formula and explanation together

Median Calculator: 24 median. 7 values sorted: 12, 18, 21, 24, 30, 34, 39 · middle position 4: 24

Formula applied

The exact method behind this answer

CalculationTime keeps the method visible so the number can be checked instead of blindly trusted.

Sort the included values from lowest to highest. If n is odd, median = value at position (n + 1) ÷ 2. If n is even, median = average of values at positions n ÷ 2 and n ÷ 2 + 1.
  1. Apply the formulaSort the included values from lowest to highest. If n is odd, median = value at position (n + 1) ÷ 2. If n is even, median = average of values at positions n ÷ 2 and n ÷ 2 + 1.24 median7 values sorted: 12, 18, 21, 24, 30, 34, 39 · middle position 4: 24

Your live breakdown

Current inputs in the calculation

These values come from the controls above and update when the calculator changes.

Value 1
12
Enter the numbers to compare. Use the active count field to choose how many values are included.
Value 2
18
Value 3
21
Value 4
24
Value 5
30
Value 6
34
Value 7
39
How many values to include
7 2 to 7
Use 2 through 7. Extra value boxes are ignored when the active count is lower.

Resulting answer

24 median

7 values sorted: 12, 18, 21, 24, 30, 34, 39 · middle position 4: 24

Answer
24 median
Live support
7 values sorted: 12, 18, 21, 24, 30, 34, 39 · middle position 4: 24

Assumptions used

What this answer assumes

Best for small lists, classroom worksheets, quick survey summaries and outlier-resistant comparisons.

  • The active count is rounded to a whole number from 2 to 7.
  • Only Value 1 through the active count are included; later boxes are ignored.
  • Negative values, decimals and repeated values are allowed because the median depends on order, not on positive-only quantities.
  • This page calculates the simple median of the entered list; grouped frequency tables and weighted medians need a separate method.

Master’s Tip

How to use the result well

Master’s Tip: print the sorted list beside the answer. The median is robust against very high or very low outliers, but only if the values being included are clear and the count is not accidentally wrong.

Printable record

What belongs in the saved calculation

Save the inputs, result, formula, assumptions, page URL and date together so the calculation can be reviewed later.

Value 1
12
Enter the numbers to compare. Use the active count field to choose how many values are included.
Value 2
18
Value 3
21
Value 4
24

Embeddable calculator

Embed this calculator

Copy a clean iframe version with the required CalculationTime attribution link built in.

Formula

Sort the included values from lowest to highest. If n is odd, median = value at position (n + 1) ÷ 2. If n is even, median = average of values at positions n ÷ 2 and n ÷ 2 + 1.

Worked example

For 12, 18, 21, 24, 30, 34 and 39, the sorted list is already in order. There are 7 values, so the median position is (7 + 1) ÷ 2 = 4. The 4th value is 24.

Professional note

Master’s Tip: print the sorted list beside the answer. The median is robust against very high or very low outliers, but only if the values being included are clear and the count is not accidentally wrong.

Regional and unit assumptions

The calculator uses the standard descriptive-statistics median rule taught in school mathematics and used in basic data summaries. It does not apply weighting, sampling correction or frequency-table shortcuts.

Assumptions and limitations

Methodology & Accuracy

How this calculator is checked

CalculationTime pages are built around visible arithmetic: the formula, assumptions, worked example and practical limitations are shown so the result can be checked rather than simply trusted.

Formula used

Sort the included values from lowest to highest. If n is odd, median = value at position (n + 1) ÷ 2. If n is even, median = average of values at positions n ÷ 2 and n ÷ 2 + 1.

Standard or basis

The calculator uses the standard descriptive-statistics median rule taught in school mathematics and used in basic data summaries. It does not apply weighting, sampling correction or frequency-table shortcuts.

Where a calculator follows a named legal, trade or industry standard, that standard is cited visibly. Otherwise the page uses transparent general arithmetic and states its limits.

Master's Tip

Master’s Tip: print the sorted list beside the answer. The median is robust against very high or very low outliers, but only if the values being included are clear and the count is not accidentally wrong.

Questions

How do you calculate the median?

Sort the values from lowest to highest. If there is one middle value, that value is the median. If there are two middle values, add them and divide by two.

What is the median of an even number of values?

For an even count, the median is the average of the two middle values after sorting. For example, the median of 4, 8, 10 and 20 is (8 + 10) ÷ 2 = 9.

Is the median the same as the average?

No. The average adds all values and divides by the count. The median only uses position after sorting, so it is less affected by extreme outliers.

Can repeated numbers be used?

Yes. Repeated numbers stay in the sorted list and can be the middle value or one of the two middle values.

Why does the calculator ask for an active count?

The active count makes the printable worksheet clear by showing exactly how many of the value boxes were included in the median.

Calculation note

Median is a positional measure of centre. It is useful when a single unusually large or small value would pull an arithmetic mean away from the typical middle of the list.

The median is about position, not total

An average uses the total of all values. A median uses the order of values. That difference matters in wages, house prices, classroom scores and response times, where one extreme value can make the average feel unlike the middle of the group.

Sorting is the audit trail

The most common median mistake is choosing a value before the list has been sorted. A useful worksheet keeps the sorted order beside the answer so the middle position can be checked by eye.

Even counts need two middle values

When the count is even, there is no single centre item. The standard rule averages the two middle values, which is why a median can be a number that was not one of the original entries.