Data Science & ML
Basic

Z-Score Normalization

Standardizes features to zero mean and unit variance.

Formula

z=x−μσz = \frac{x - \mu}{\sigma}

Variables

xValue
\muMean
\sigmaStandard deviation

Example

x=85, \mu=70, \sigma=10: z = 1.5

How it works

Z-score normalization tells you how far a value is from the average, measured in standard deviations. Subtracting the mean recenters the data at 0, and dividing by the standard deviation rescales it so a spread of 1 represents one typical unit of variation. This works because it preserves relative position in the distribution while putting features on a common scale, which is especially useful when different variables have very different units or magnitudes.

When to use it

Use it when comparing or feeding multiple numeric features into a model that is sensitive to scale, such as distance-based methods or gradient-based learning. It is also useful when you want to interpret a value as unusually high or low relative to its dataset.

Worked example, step by step

Given x = 42, μ = 30, σ = 6 Step 1: Subtract the mean: 42 - 30 = 12 Step 2: Divide by the standard deviation: 12 / 6 = 2 Step 3: z = 2 Final answer: the z-score is 2, meaning the value is 2 standard deviations above the mean.

Common mistakes to avoid

  • Using variance instead of standard deviation in the denominator
  • Forgetting to subtract the mean before dividing
  • Applying z-score normalization to categorical data or to data with a zero standard deviation

Did You Know?

Also called standardization; assumes roughly Gaussian data.

Share this formula

Reviewed & maintained by the FormulaWon editorial teamLast reviewed September 2026