Skip to content
induwara.lk
Premium
induwara.lkAI · Model monitoring

Population Stability Index (PSI) Calculator

Paste an expected (baseline) and an actual (current) distribution across the same bins to get the Population Stability Index — the standard measure of data and population drift for ML models and credit scorecards. You get the total PSI, a per-bin breakdown showing which segment moved, and a stable / moderate / significant verdict. It runs entirely in your browser and needs no signup.

By Induwara AshinsanaUpdated Jul 12, 2026
PSI drift calculator
Input mode
Zero-bin handling
Log base

0 < ε ≤ 0.01. Clips empty bins.

Distribution bins
Bin labelExpected (%)Actual (%)
Presets
Total PSI
0.1014
Σ per-bin contributions
Verdict
Moderate shift (0.10–0.25)
Bins
4
No empty bins
Column sums
100 / 100
Expected / actual (raw)

PSI = 0.1014 — in the 0.10–0.25 band, a moderate population shift. Investigate the drifting bins and monitor closely; recalibration may become necessary if the trend continues. The largest single driver is "Bin 1", contributing 0.0405 (40% of the total).

Per-bin breakdown

BinEᵢAᵢAᵢ − Eᵢln(Aᵢ/Eᵢ)Contribution
Bin 1
0.30000.2000-0.1000-0.40550.0405
Bin 2
0.30000.2500-0.0500-0.18230.0091
Bin 3
0.20000.25000.05000.22310.0112
Bin 4
0.20000.30000.10000.40550.0405
Total PSI0.1014

Method: PSI = Σ (Aᵢ − Eᵢ)·ln(Aᵢ/Eᵢ)with Siddiqi's <0.10 / 0.10–0.25 / ≥0.25 thresholds. Empty bins are clipped to ε (Siddiqi / Evidently AI convention). Sources cited below the calculator. No data leaves this page.

How it works

The Population Stability Indexanswers a single question: has the distribution I am scoring today drifted away from the distribution my model was built on? It is the workhorse drift metric in credit-risk model validation and MLOps monitoring, defined in Naeem Siddiqi's Credit Risk Scorecards and implemented the same way in production tools such as Evidently AI.

You supply two distributions binned the same way — for a scorecard that is usually score deciles. Call the baseline the expected distribution and the current period the actual distribution. Each column is normalised to fractions:

Eᵢ = expectedᵢ / Σ expected    Aᵢ = actualᵢ / Σ actual

Then each bin's contribution and the total are:

PSI = Σᵢ (Aᵢ − Eᵢ) · ln(Aᵢ / Eᵢ)

  1. Normalise. Counts and percentages both become fractions, so the scale of your data does not matter — only the shape of the two distributions.
  2. Clip empty bins. A 0 fraction makes ln(Aᵢ/Eᵢ) diverge, so any 0 is replaced by a small ε (default 0.0001) before the log — the Siddiqi / Evidently convention. Every term stays finite; no Infinity or NaN can appear.
  3. Sum the contributions. Each (Aᵢ − Eᵢ)·ln(Aᵢ/Eᵢ) is always non-negative, because the difference and the log ratio share the same sign — so PSI is a distance-like number that grows as the two distributions separate.
  4. Read the verdictagainst Siddiqi's action thresholds: below 0.10 is stable, 0.10 to 0.25 is a moderate shift to investigate, and 0.25 or above is a significant shift that usually calls for recalibration or retraining.

The same formula applied to a single input feature rather than the model output is called the Characteristic Stability Index (CSI), which is how analysts trace which variable caused a population to drift. The thresholds are defined for the natural log; the log2 option reports the identical index in bits (PSI / ln 2) for readers who prefer an information-theoretic unit.

Worked examples

Moderate shift — PSI 0.1014 (the default preset)

  1. Expected % = [30, 30, 20, 20], Actual % = [20, 25, 25, 30]
  2. Normalised: E = [.30, .30, .20, .20], A = [.20, .25, .25, .30]
  3. Bin 1: (.20−.30)·ln(.20/.30) = (−.10)·(−0.405465) = 0.040547
  4. Bin 2: (.25−.30)·ln(.25/.30) = (−.05)·(−0.182322) = 0.009116
  5. Bin 3: (.25−.20)·ln(.25/.20) = ( .05)·( 0.223144) = 0.011157
  6. Bin 4: (.30−.20)·ln(.30/.20) = ( .10)·( 0.405465) = 0.040547
  7. PSI = 0.101366 → moderate shift (just over 0.10)

Significant shift — PSI 0.5498 (raw counts)

  1. Expected counts = [500, 300, 200] (Σ=1000), Actual = [200, 300, 500] (Σ=1000)
  2. Normalised: E = [.5, .3, .2], A = [.2, .3, .5]
  3. Bin 1: (.2−.5)·ln(.2/.5) = (−.3)·(−0.916291) = 0.274887
  4. Bin 2: (.3−.3)·ln(1) = 0
  5. Bin 3: (.5−.2)·ln(.5/.2) = ( .3)·( 0.916291) = 0.274887
  6. PSI = 0.549775 → significant shift (≥ 0.25); the low and high score bands swapped

Empty bin — clipping keeps it finite (edge case)

  1. Expected counts = [50, 50, 0] (Σ=100), Actual = [40, 40, 20] (Σ=100)
  2. Bin 3 expected fraction is 0 → clipped to ε = 0.0001 before the log
  3. Bins 1,2: (.4−.5)·ln(.4/.5) = 0.022314 each
  4. Bin 3: (.2−.0001)·ln(.2/.0001) = .1999·7.600902 = 1.519420
  5. PSI ≈ 1.564049 → significant, and finite (never Infinity/NaN)
  6. Lesson: one empty bin dominates — re-bin rather than trust a clipped result

Frequently asked questions

Sources & references

The formula and thresholds on this page were last cross-checked against these sources on 2026-07-12. PSI is a stable mathematical definition, so this tool needs no rate or schedule updates — only the worked examples are periodically re-reconciled.

Related tools

Rate this tool
Be the first to rate

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 to suggest an improvement?

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