Credit Risk KS Statistic & Score Band Analyzer
Measure how well a credit score separates good from bad. Get the KS statistic, the full score-band table with bad rate and lift, the cut-off of maximum separation, and AUC and Gini — from a CSV of scores and a binary target, or from counts you have already binned.
Your file is parsed in the browser. Scores are never uploaded.
Paste scores and a 0/1 target, or load the sample file, to see the KS and score bands.
- AUC
- —
- Gini
- —
- Bads / goods
- —
- Maximum separation at
- —
Cumulative good and bad distributions
KS is the widest vertical gap between the two curves. The solid rule marks it.
How the KS statistic is calculated
KS turns two overlapping score distributions into one number: how far apart the model manages to push goods and bads.
Reported on a 0–100 scale. AUC is the area under the ROC curve the bands trace, and Gini is 2 × AUC − 1. All three come from the same band table on this page.
- 1
Rank by score
Sort the population by score and split it into bands, normally ten deciles, from the lowest score to the highest.
- 2
Accumulate each class
Walking through the bands, track the running share of all bads and of all goods captured so far.
- 3
Take the widest gap
KS is the largest distance between the two cumulative curves. The band where it happens is a natural cut-off.
KS strength
The conventional reading in scorecard validation.
- < 20Weak separation
- 20 – 60Acceptable — where most scorecards sit
- 60 – 75Strong
- > 75Suspiciously high — check for leakage
These bands are conventions, not statistical tests. What counts as good depends on the portfolio, and a stable KS over time matters as much as a high one.
Reading the score bands
A clean scorecard shows the bad rate falling smoothly from the lowest score band to the highest, with lift above 1 in the risky bands and below 1 in the safe ones. That monotonic pattern is the sign the score is rank ordering.
The KS column peaks in the middle of the range and returns to zero at the ends, because the cumulative curves must both start at 0 and finish at 100%. The peak band is where a single approve or decline cut-off separates goods from bads best.
Because KS here is read at the band boundaries, deciles give a slightly conservative figure. Use more bands when you need the reported value to track the exact empirical KS closely.
Take the validation back to your notebook
A single KS is a spot check. Validating a scorecard means recomputing KS, AUC, and the band table on every refresh and every out-of-time sample, on data that never leaves your environment. Copy the Python above into your own notebook, or let an agent with a live Jupyter kernel keep the validation run reproducible.
Related risk tools
- Weight of Evidence & IV CalculatorMeasure how strongly each feature separates good from bad before it enters the score.
- Population Stability Index CalculatorOnce the score is live, track whether its distribution drifts from the baseline.
- All Runcell toolsBrowser-side calculators for risk modeling, data work, and notebook workflows.
FAQ
Common questions about the KS statistic, score bands, and how they relate to AUC and Gini.