MLB Pythagorean Expectation Model
v0.1 · live MLB data

Predict baseball games with a 40-year-old formula.

A desktop app that runs Bill James' Pythagorean Expectation on tonight's slate — and walks you through every step of the math.

Predictions screen — a card per matchup with win-probability bars, projected runs, fair odds, starting pitcher, and L20 form per side
What it does

Three things you can't get from a box score.

01 · Predicts

Every game on the slate, in one screen.

Win probability, projected runs, and fair betting odds for every matchup on a given date. Pulls live from MLB's Stats API. Cards update with the announced starter and each team's last-20-games form.

02 · Explains

Shows its work, not just its answer.

A built-in Learn tab walks through Pythagorean expectation, log5, the run environment, and the three optional adjustments — in plain English, with formulas and a worked example.

03 · Lets you play

Turn every knob, in real time.

The Playground puts every team's numbers in your hands. Drag the Pythagorean exponent, swap pitchers, override L20 rates, flip toggles — the win probability and sensitivity chart move instantly.

A guided tour

Five tabs. Each one earns its place.

The app is intentionally small — one nav per job. Predictions for tonight, Standings for the league, Stats for the angles the box score buries, Learn for the math, Playground for everything you want to try.

01 · Standings

The league at a glance.

Six division tables plus the wild-card race per league, direct from MLB's stats API. Division leaders get a star; teams currently in wild-card position are subtly tinted so you can find them without squinting.

Streaks and run differentials are color-coded — green for hot, red for cold. The table tells a story at a glance instead of making you parse numbers.

Standings page screenshot
02 · Stats

The angles mlb.com doesn't bother with.

Every leaderboard here is filtered through the Pythagorean lens. Luck compares each team's actual record to what their run differential predicts. The Rays winning more than their numbers say, the Dodgers winning fewer.

Best offenses and Best defenses are indexed to the league average. Hot and Cold surfaces real momentum shifts by comparing the last 20 games' net runs to the full season.

Stats page screenshot
03 · Learn

Plain-English math, not Wikipedia.

A walkthrough of every formula the app uses, with the why next to the what. Each section has its own anchor on the left so you can jump to the part you care about — what Pythagorean is, why it works, how we combine two teams into a matchup, how we predict the score.

The model's blind spots get their own sections too. The pitcher adjustment. Home-field advantage. Recent-form weighting. What each one captures, what it still misses.

Learn page screenshot
04 · Playground

A sandbox for stat curiosities.

A sortable team table on the left, a live matchup editor on the right. Override any team's runs scored or runs allowed. Plug in a different starter's ERA. Set a custom L20 line. Flip any of the three model adjustments on or off.

The win probability, predicted runs, and fair odds update instantly. A sensitivity chart shows how much the prediction changes as you sweep the Pythagorean exponent across its full range.

Playground page screenshot
The math in one paragraph

A team's record tracks a function that looks a lot like the Pythagorean theorem.

Win % = RSx RSx  +  RAx

Where RS is runs scored, RA is runs allowed, and x is an exponent the app fits to this season's actual results (usually somewhere near 1.83). Two teams' Pythagorean percentages combine into a matchup probability via log5; we then layer optional adjustments for the starting pitcher, home-field advantage, and recent form. Every step is shown in the app's Learn tab.

Open source. Free forever.

The whole prediction pipeline runs locally on your machine. No accounts, no telemetry, no scraping. Just MLB's public stats API and a few hundred lines of Rust.