Skip to content
induwara.lk
Premium
induwara.lkAI · Machine learning

Brier Score Calculator

Paste your forecast probabilities and the actual 0/1 outcomes to get the Brier score — the mean squared error of your probabilities — plus the Brier Skill Scoreversus a baseline, the formula, and a per-prediction breakdown. It matches scikit-learn's brier_score_loss, runs entirely in your browser, and needs no signup.

By Induwara AshinsanaUpdated Sep 7, 2026
Brier score calculator

Each forecast as a probability in [0, 1]. Separate with commas, spaces, or new lines.

The realised outcome for each forecast: 1 if the event happened, 0 if not.

Skill-score baseline

The reference forecast the Brier Skill Score is measured against.

Presets
Brier score
0.0750
Mean squared error (0 best, 1 worst)
Skill score (BSS)
0.6000
1 − BS / BS_ref
Base rate
0.7500
Mean outcome = 75% positive
Pairs (N)
4
Reference Brier 0.1875

Brier score 0.0750 on a 0 (best) to 1 (worst) scale — better than the base-rate baseline of 0.1875. Skill score 0.6000: 60.0% better than the baseline (reference Brier 0.1875).

Decimals

Formulas

  • BS = (1/N) Σ (fᵢ − oᵢ)²
  • ō = (1/N) Σ oᵢ  (base rate)
  • BS_ref = (1/N) Σ (r − oᵢ)²
  • BSS = 1 − BS / BS_ref

Cross-check. The direct mean-squared-error gives BS = 0.0750; the independent per-class split Σ(1−f)² over positives + Σf² over negatives gives 0.0750. They reconcile, as they must — the result is verified.

Per-prediction breakdown

#Probability fOutcome oSquared error (f − o)²
10.900010.0100
20.800010.0400
30.300000.0900
40.600010.1600
Brier score = mean squared error0.0750

Method: BS = (1/N) Σ (fᵢ − oᵢ)² (Brier 1950, matching scikit-learn brier_score_loss), with BSS = 1 − BS / BS_ref (US National Weather Service). Sources cited below the calculator. No data leaves this page.

How it works

The Brier score grades probabilistic forecasts. Instead of asking whether a hard label was right, it measures how far each predicted probability sat from what actually happened. It was defined by Glenn Brier in 1950 for weather verification and is identical to the mean squared error of the probabilities — the same quantity scikit-learn returns from brier_score_loss.

With N forecasts, each a probability fᵢ ∈ [0, 1] of a binary event whose actual outcome is oᵢ ∈ {0, 1}:

BS = (1/N) Σ (fᵢ − oᵢ)²

  1. Validate. Every probability must lie in [0, 1], every outcome must be 0 or 1, and the two lists must be the same length. Bad input gets a specific message, never a silent NaN.
  2. Score. Square each gap (fᵢ − oᵢ)² and average them. For binary outcomes this lands in [0, 1]; 0 is a perfect, fully-confident-and-correct forecaster.
  3. Baseline. Compute the reference Brier score for a constant forecast r:

    BS_ref = (1/N) Σ (r − oᵢ)²

    With the base rate r = ō (the mean outcome) this simplifies to the outcome variance ō(1 − ō) — the score of a climatology forecaster that always predicts the long-run frequency.
  4. Skill. The Brier Skill Score rescales the Brier score against that baseline:

    BSS = 1 − BS / BS_ref

    Above 0 the model beats the baseline; 0 ties it; below 0 it is worse than just predicting the reference. When the baseline is itself perfect (BS_ref = 0, every outcome identical) the skill score is undefined and the tool shows “—” rather than dividing by zero.

As an internal correctness gate the tool also recomputes the Brier score a second way — splitting the sum by class into Σ(1 − fᵢ)² over the positive cases plus Σfᵢ² over the negatives — and asserts the two agree to floating-point precision. The two forms are algebraically identical because oᵢ²= oᵢ for binary outcomes, so any disagreement would signal a bug.

What the score is actually made of

Allan Murphy showed in 1973 that the Brier score splits into three interpretable pieces once you group forecasts by the distinct probability values they used. With K distinct forecast values, n_k cases issued at value f_k, and ō_k the observed frequency inside that group:

BS = reliability − resolution + uncertainty

  • Reliability = (1/N) Σ n_k (f_k − ō_k)² — miscalibration. When you say 70% and the event happens 70% of the time, this term is 0. Lower is better.
  • Resolution = (1/N) Σ n_k (ō_k − ō)² — how far your groups pull away from the overall base rate. This is sharpness that turned out to be justified. Higher is better, and it subtracts from the score.
  • Uncertainty = ō(1 − ō) — the difficulty of the events themselves. You cannot change it by forecasting better; it is the same term that acts as the base-rate baseline.

The decomposition explains why two very different failures produce the same headline number. A model that is perfectly calibrated but never moves off the base rate has zero reliability error and zero resolution — it scores exactly the baseline. A model that is sharp but overconfident has strong resolution eaten back by a large reliability term. If you want the reliability half measured directly rather than inferred, the expected calibration error calculator bins the same probabilities and reports the calibration gap on its own.

Edge cases this tool handles

  • All outcomes identical. If every oᵢ is 1 (or every one is 0) the base rate is 1 (or 0), so BS_ref = ō(1 − ō) = 0 and the skill score would divide by zero. The tool returns “—” with a note instead of NaN or Infinity.
  • Probabilities pasted as percentages. A value like 90 is rejected by name and position rather than silently scored — the Brier score of a 90 against an outcome of 1 would be 7921, which is meaningless. Divide by 100 first.
  • Mismatched list lengths. Twelve probabilities and eleven outcomes is the most common paste error in evaluation work. The error message names both counts so you can see which column lost a row.
  • Outcomes that are not 0 or 1.This is a binary scorer, so a stray 2, “yes” or empty cell is refused. Map labels to 0/1 before pasting.
  • Single forecast. One pair is legal — the score is just that one squared error — but the base-rate skill score is undefined for it, because a one-case base rate is always 0 or 1.
  • Brackets and newlines. Square brackets, parentheses, tabs, commas and line breaks are all stripped, so a NumPy array or a spreadsheet column pastes in directly with no cleanup.

Two practical cautions. First, the Brier score is only comparable across datasets with the same base rate — a 0.05 on a rare-event problem may be worse than a 0.20 on a balanced one, which is exactly why the skill score exists. Second, with small N the score is noisy: twenty forecasts give you an estimate with a wide interval around it, so treat rankings between close models as provisional until you have a few hundred cases.

Brier score vs the other metrics you report

The Brier score answers one question: were the probabilities themselves right? Most of the metrics sitting next to it in an evaluation report answer something else, and reading them together is how you tell a ranking problem from a calibration problem.

  • Log loss / cross-entropy — the other strictly proper rule. It punishes confident errors without bound where the Brier score caps a single case at 1. Score the same file both ways with the cross-entropy loss calculator; when the two disagree about which model wins, a few extreme predictions are driving the result.
  • ROC AUC — pure ranking. AUC is unchanged if you put every probability through any monotone transform, so a badly calibrated model can post a 0.95 AUC and a poor Brier score at the same time. Pair this page with the ROC AUC calculator to separate discrimination from calibration.
  • Accuracy, precision, recall and F1 — threshold metrics. They need a cut-off before they mean anything, and they discard confidence entirely. If you have thresholded predictions rather than probabilities, the F1 score calculator and the confusion matrix calculator are the right pages for that stage.
  • Expected calibration error — the reliability term of the Brier decomposition, measured directly and reported on its own scale. Useful when you need to say how far off the probabilities are rather than how much total error they caused.

A reasonable default in a model card: report the Brier score, the Brier Skill Score against the base rate, and one ranking metric. The first says how good the probabilities are, the second says whether they beat doing nothing, and the third says whether the ordering is usable even if the numbers need recalibrating.

Worked examples

Four forecasts — Brier 0.0750, skill 0.6000 (the Demo preset)

  1. Probabilities f = [0.9, 0.8, 0.3, 0.6], outcomes o = [1, 1, 0, 1]. N = 4
  2. Squared errors: (0.9−1)²=0.01, (0.8−1)²=0.04, (0.3−0)²=0.09, (0.6−1)²=0.16
  3. Sum = 0.30 → Brier score = 0.30 / 4 = 0.0750
  4. Base rate ō = 3/4 = 0.75; BS_ref = ō(1−ō) = 0.75·0.25 = 0.1875
  5. Brier Skill Score = 1 − 0.0750 / 0.1875 = 1 − 0.40 = 0.6000
  6. Read-out: 60% better than always predicting the base rate

Custom baseline 0.5 on the same data — skill 0.7000

  1. Same forecasts, but the reference is a fixed 0.5 (a coin flip), not the base rate
  2. BS_ref = mean((0.5 − o)²) = (0.25·3 + 0.25·1) / 4 = 0.25
  3. Brier Skill Score = 1 − 0.0750 / 0.25 = 1 − 0.30 = 0.7000
  4. Against an uninformed 0.5 forecaster the model looks even stronger

The bounds — perfect 0.0000 and worst 1.0000

  1. Perfect: f = [1, 0, 1] against o = [1, 0, 1] → every squared error 0 → Brier = 0.0000
  2. Worst (binary): f = [0, 1] against o = [1, 0] → (0−1)² + (1−0)² = 2
  3. Brier = 2 / 2 = 1.0000 — the maximum a binary forecaster can score
  4. Edge case: outcomes all identical (e.g. all 1) make BS_ref = 0, so the skill score is shown as '—' rather than dividing by zero

Confidently wrong — Brier 0.3750, skill −1.0000 (a negative skill score)

  1. Probabilities f = [0.2, 0.3, 0.1, 0.4], outcomes o = [1, 1, 0, 1]. N = 4
  2. Squared errors: (0.2−1)²=0.64, (0.3−1)²=0.49, (0.1−0)²=0.01, (0.4−1)²=0.36
  3. Sum = 1.50 → Brier score = 1.50 / 4 = 0.3750
  4. Base rate ō = 3/4 = 0.75; BS_ref = 0.75·0.25 = 0.1875
  5. Brier Skill Score = 1 − 0.3750 / 0.1875 = 1 − 2 = −1.0000
  6. Read-out: 100% worse than the base rate. Three of four events happened,
  7. but the model leaned low every time — a calibration failure, not a ranking one:
  8. the ordering 0.4 > 0.3 > 0.2 > 0.1 is nearly right, the levels are not.

Decomposition — Brier 0.2000 split into reliability, resolution and uncertainty

  1. f = [0.9, 0.9, 0.9, 0.9, 0.2, 0.2, 0.2, 0.2], o = [1, 1, 1, 0, 0, 0, 1, 0]. N = 8
  2. Direct: group at 0.9 contributes 3·(0.1)² + (0.9)² = 0.84;
  3. group at 0.2 contributes 3·(0.2)² + (0.8)² = 0.76; sum 1.60 → BS = 1.60/8 = 0.2000
  4. Base rate ō = 4/8 = 0.5 → uncertainty = ō(1−ō) = 0.2500
  5. Group frequencies: ō₁ = 3/4 = 0.75 at f = 0.9; ō₂ = 1/4 = 0.25 at f = 0.2
  6. Reliability = [4(0.9−0.75)² + 4(0.2−0.25)²] / 8 = (0.09 + 0.01) / 8 = 0.0125
  7. Resolution = [4(0.75−0.5)² + 4(0.25−0.5)²] / 8 = (0.25 + 0.25) / 8 = 0.0625
  8. Check: 0.0125 − 0.0625 + 0.2500 = 0.2000 ✓ matches the direct score
  9. Skill score = 1 − 0.2000 / 0.2500 = 0.2000. The model is mildly overconfident
  10. (reliability > 0) but its two groups do separate real from unlikely, so it clears the baseline.

Frequently asked questions

Sources & references

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.