Min-Max Normalization
Rescales features to the range [0, 1].
Formula
Live Calculator
MembersVariables
Example
x=25 in [0,100]: 0.25
How it works
Min-max normalization linearly stretches or compresses a value so the smallest value in a feature becomes 0 and the largest becomes 1. It works by measuring how far x is above the minimum, then dividing by the full data range, so the result is the fraction of the interval from minimum to maximum that x occupies. This preserves the original ordering of values and keeps the spacing proportional, just on a standardized scale.
When to use it
Use this when different numeric features need to be compared on the same scale, such as before distance-based methods like k-nearest neighbors or clustering. It is also useful when you want all inputs to lie in a fixed range, especially [0, 1], for neural networks or visualizations.
Worked example, step by step
Suppose a dataset has values from 10 to 50, and we want to normalize x = 30. Step 1: Identify the minimum and maximum: x_min = 10, x_max = 50 Step 2: Substitute into the formula: x' = (x - x_min) / (x_max - x_min) Step 3: Compute the numerator: 30 - 10 = 20 Step 4: Compute the denominator: 50 - 10 = 40 Step 5: Divide: x' = 20 / 40 = 0.5 Final answer: the normalized value is 0.5
Common mistakes to avoid
- Using the sample's current value as the minimum or maximum instead of the true feature-wide min and max
- Forgetting to subtract the minimum before dividing, which changes the scale incorrectly
- Applying min-max normalization to new test data using test-set min and max instead of the training-set values
Did You Know?
Min-max scaling preserves the shape of the original distribution.
Share this formula
More in Data Science & ML
View allMean Squared Error (MSE)
BasicAverage of squared differences between predicted and actual values.
Root Mean Squared Error (RMSE)
BasicSquare root of MSE, in the same units as the target variable.
Mean Absolute Error (MAE)
BasicAverage of absolute differences between predictions and actual values.
Coefficient of Determination (R²)
IntermediateProportion of variance in the target explained by the model.
Classification Accuracy
BasicFraction of predictions that are correct.
Precision
IntermediateOf all positive predictions, the fraction that were correct.