Skip to content
induwara.lk
induwara.lkData Science · Machine Learning

Feature Scaling & Normalization Calculator

Paste a column of numbers and instantly rescale it four ways, Min-Max normalization, Z-score standardization, MaxAbs, and Robust scaling, using the exact scikit-learn formulas, with every fitted parameter shown so you can check the arithmetic by hand.

By Induwara AshinsanaUpdated Jul 13, 2026
Scale & normalize your data
scikit-learn formulas

Separate values with commas, spaces, or new lines. 2–1000 numbers.

Try
Std dev basis

Fitted parameters

count (n)
5
min
10.0000
max
50.0000
range
40.0000
mean (μ)
30.0000
std (σ, ÷N)
14.1421
median
30.0000
Q1
20.0000
Q3
40.0000
IQR
20.0000
max |x|
50.0000

Scaled values

#OriginalMin-MaxZ-scoreMaxAbsRobust
1100.0000-1.41420.2000-1.0000
2200.2500-0.70710.4000-0.5000
3300.50000.00000.60000.0000
4400.75000.70710.80000.5000
5501.00001.41421.00001.0000

Formulas and edge-case behaviour follow scikit-learn's preprocessing documentation. StandardScaler uses the population standard deviation (÷N) by default. All maths runs in your browser, nothing is uploaded.

How it works

Feature scaling puts columns that live on different numeric ranges onto a common footing so that distance- and gradient-based models, k-nearest neighbours, SVMs, k-means, PCA, and neural nets, are not dominated by whichever feature happens to have the largest units. This calculator fits and applies the four transforms defined in the scikit-learn preprocessing guide to a single feature vector X = [x₁, …, xₙ].

  1. Min-Max normalization (MinMaxScaler): x_std = (xᵢ − min) / (max − min), then map to a target range [a, b] with x_scaled = x_std · (b − a) + a. The default range [0, 1] reduces to x_std. A constant feature (max = min) maps to the range minimum a.
  2. Z-score standardization (StandardScaler): x_scaled = (xᵢ − μ) / σ, with mean μ = (1/n)·Σxᵢ. scikit-learn uses the population standard deviation σ = √((1/n)·Σ(xᵢ − μ)²) (ddof = 0). A sample-basis toggle switches the divisor to n − 1. Zero variance yields 0 for every element.
  3. MaxAbs scaling (MaxAbsScaler): x_scaled = xᵢ / max(|X|). It maps data into [−1, 1] without shifting the centre, which preserves sparsity (zeros stay zero). If the largest magnitude is 0, the output is 0.
  4. Robust scaling (RobustScaler): x_scaled = (xᵢ − median) / IQR, where IQR = Q3 − Q1. Quartiles use linear interpolation (the NumPy default): for a sorted array the p-th quantile sits at position h = (n − 1)·p and is interpolated between neighbouring points. Because it uses the median and IQR, outliers barely affect it.

The fitted parameters panel shows every number the scalers depend on, min, max, range, mean, standard deviation, median, Q1, Q3, IQR, and maximum absolute value, so each output can be reproduced by hand. As a correctness check, the population standard deviation is computed two algebraically independent ways: the sum of squared deviations, and the moment identity Var = E[X²] − (E[X])². When they agree, the panel shows a “σ verified” badge.

Worked examples

Basic ramp, [10, 20, 30, 40, 50]

  1. Parameters: min=10, max=50, range=40, μ=30, σ=√(200)=14.1421, median=30, IQR=20, max|x|=50
  2. Min-Max: (20 − 10) / 40 = 0.25 → [0, 0.25, 0.5, 0.75, 1]
  3. Z-score: (20 − 30) / 14.1421 = −0.7071 → [−1.4142, −0.7071, 0, 0.7071, 1.4142]
  4. MaxAbs: 20 / 50 = 0.4 → [0.2, 0.4, 0.6, 0.8, 1]
  5. Robust: (10 − 30) / 20 = −1.0 → [−1, −0.5, 0, 0.5, 1]

Textbook σ = 2 with quartiles, [2, 4, 4, 4, 5, 5, 7, 9]

  1. Mean μ = 40 / 8 = 5; deviations (−3,−1,−1,−1,0,0,2,4); Σ(dev²) = 32
  2. Population σ = √(32 / 8) = √4 = 2
  3. Z-score: (2 − 5)/2 = −1.5 → [−1.5, −0.5, −0.5, −0.5, 0, 0, 1, 2]
  4. Quartiles (linear): Q1 pos = 7·0.25 = 1.75 → 4; median pos = 3.5 → 4.5; Q3 pos = 5.25 → 5.5; IQR = 1.5
  5. Robust: (2 − 4.5)/1.5 = −1.6667 → [−1.6667, −0.3333, −0.3333, −0.3333, 0.3333, 0.3333, 1.6667, 3]

Edge case, constant data [7, 7, 7]

  1. range = 0, σ = 0, IQR = 0 → every scaler that divides would hit 0/0
  2. Min-Max: maps to the target minimum → [0, 0, 0] (for range [0, 1])
  3. Z-score: with_std no-op → [0, 0, 0]
  4. Robust: zero IQR no-op → [0, 0, 0]
  5. MaxAbs: 7 / |7| = 1 → [1, 1, 1] (only 0 if the constant is itself 0)

Frequently asked questions

Sources & references

Formulas and edge-case behaviour were last cross-checked against the scikit-learn documentation on 2026-07-13. Both worked examples were reconciled by hand and against scikit-learn's fit_transform output.

Related tools

Comments & feedback

Spotted a bug or want an improvement? Tell us, our team reviews every comment, and good ideas get built. Comments are public and anonymous.

Found a bug, edge case, or want another scaler added?

Email me at [email protected] , most fixes ship within 24 hours.