Statistics & probability

Weighted median calculator

Find the first ordered value reaching half the total weight.

Weighted median calculator
Esc to restore

Your inputs

Up to 50,000 values. No thousands separators. Absolute values up to 1 trillion; non-zero values must be at least 1e-100 in magnitude.

Up to 50,000 values. No thousands separators. Absolute values up to 1 trillion; non-zero values must be at least 1e-100 in magnitude.

Results update as you type. Larger files run when you press Update result.

Your result

LOCAL & PRIVATE

Your result will appear here.

Your inputs stay in this browser. Nothing is uploaded or saved.

A clear answer. Here’s how.

Sorts value/weight pairs and returns the first value whose cumulative positive weight reaches at least half the total. Zero weights are ignored. Uses the lower weighted-quantile convention at an exact half-weight boundary; it does not average the two adjacent values. Equal-length lists and positive total weight are required.

See a worked example

Worked example

A fixed demonstration, separate from the values you enter above.

Values
10, 20, 30
Matching non-negative weights
1, 3, 1

Example result

Lower weighted median
20
Total weight
5
Positive-weight observations
3