Data Imputation Calculator
Estimate missing data values using mean, median, mode, or linear interpolation imputation methods. Compare imputation accuracy against actual values.
About this calculator
This calculator imputes a missing value from a five-point series (Value 1 through Value 5) using the Mean, Median, or Mode of the four values that remain after the value at Missing Value Position is treated as missing (line 17), then compares that estimate against the real value at that position to report Absolute Error and Percent Error. At the default Missing Value Position of 3, Value 3 plays no role at all in computing Mean, Median, or Mode — it's filtered out of the knownValues array before any of the three statistics run — and instead only appears afterward as Actual Value, the number the estimate gets compared against. Because Missing Value Position and Imputation Method are both small integers, a ±10% nudge from a slider rounds right back to the same value (Math.round(3×0.9)=3, Math.round(3×1.1)=3, line 13), so this calculator's own sensitivity checks can't exercise the position-3-vs-position-1 or mean-vs-median-vs-mode branches — only entering a clearly different whole number changes which value is excluded or which statistic runs.
Value 5 raises the Mean output whenever it's one of the four known values, since Mean is a simple unweighted average of whichever four values aren't excluded. This calculator only offers mean, median, and mode imputation plus a basic linear interpolation shown for comparison — it does not implement K-nearest-neighbors or multiple imputation by chained equations, so results should be read as a basic-methods comparison rather than a full imputation pipeline.
Inputs
Results
Imputed Value
20
How to Use This Calculator
- Enter your five data values and choose which position represents the missing value.
- Select the imputation method: mean, median, or mode.
- Review the Imputed Value and compare it to the Actual Value using Absolute Error and Percent Error.
- Apply the imputation and re-check feature distributions for introduced bias.
- Validate imputed data by comparing downstream model performance with vs. without imputation.
How the result changes with Value 5
| Value 5 | Imputed Value |
|---|---|
| 15 | 16.25 |
| 23 | 18.25 |
| 45 | 23.75 |
| 75 | 31.25 |
What each input means
- Value 1
- First data value in your series.
- Value 2
- Second data value in your series.
- Value 3
- Third data value — this is the default 'missing' position for imputation testing.
- Value 4
- Fourth data value in your series.
- Value 5
- Fifth data value in your series.
- Missing Value Position
- Which value to treat as missing for imputation. The actual value is used for error comparison.
- Imputation Method
- Mean: average of known values. Median: middle value. Mode: most frequent value.
How this is calculated
Worked example, using the default values
- Identify Input Parameters4 parametersValue 1 = 10, Value 2 = 15, Value 3 = 20, Value 4 = 25 = 7 input(s) provided
- Calculate Imputed ValueImputed Value20 = 20
- Calculate Method UsedMean = Mean
- Calculate MeanMean = mean20 = 20
Engine last updated . Checked against 2 independently-derived tests — how we verify calculators. Built by Paul Gunder, a software engineer, not a licensed financial, medical, or legal professional.
Frequently Asked Questions
Does dragging the Missing Value Position slider a little bit change which value gets excluded?
Only if you land on a genuinely different whole number. A small nudge like moving from 3 to 3.3 rounds right back down to 3 (line 13, Math.round), so this calculator's own sensitivity checks see zero effect from a small position change — you have to pick a clearly different integer, like 1, 2, 4, or 5, to actually exclude a different value.
Does Value 3 affect the Mean, Median, or Mode shown?
Not at the default Missing Value Position of 3. That value is filtered out of the knownValues array before Mean, Median, and Mode are computed (line 17), and only reappears afterward as Actual Value, the number the imputed estimate gets measured against for Absolute Error and Percent Error.
Can I choose K-nearest-neighbors or MICE imputation with this calculator?
No — the Imputation Method field only offers Mean, Median, and Mode, plus a Linear Interpolation figure shown alongside them for comparison in the chart. K-nearest-neighbors and multiple imputation by chained equations aren't implemented here.
How is the Linear Interpolation value calculated?
It depends on where the missing position sits: at the first or last position it extrapolates from the nearest two known values' difference (lines 48-54), and everywhere in between it simply averages the two immediate neighbors of the missing position (lines 55-59) — not the same four-value average the Mean method uses.
Related Calculators
The questions that sit next to this one — chosen by subject, including calculators filed under a different category.
Feature Scaling Calculator
Scale raw feature values using min-max normalization, z-score standardization, robust scaling, and max-abs normalization for machine learning preprocessing.
Data ScienceOutlier Detection Calculator
Detect outliers using IQR bounds, z-score bounds, and modified z-score methods. Determine whether a data point is an outlier using configurable thresholds.
Math & StatisticsAverage Calculator
Calculate mean, median, mode, range, geometric mean, and harmonic mean of a set of numbers.
Data ScienceA/B Test Calculator
Determine statistical significance of A/B test results. Calculate z-score, p-value, conversion lift, and whether your variant beats the control at your chosen confidence level.
More in Math & Statistics.