Building an MLB Betting Model: From Pythagorean Expectation to Your Own Projections

My first MLB betting model was a spreadsheet with twelve columns and a formula I copied from a baseball statistics blog. It was crude, slow, and riddled with errors. It also outperformed my gut-feeling approach by a measurable margin within six weeks. You do not need a computer science degree or a Python installation to build a useful model. You need a spreadsheet, publicly available data, and two foundational formulas that baseball analysts have refined over decades.
The model you build will never be perfect. Sportradar’s official data feed — the same infrastructure that serves its network of 800 bookmaker clients — powers the line-setting algorithms your model competes against. Those algorithms have access to real-time data, historical databases, and computational power you cannot match. But they also have blind spots. They price games for the average bettor, not for the analyst who has identified a specific situational edge. That gap is where your model earns its keep.
Pythagorean Expectation: Estimating Win Totals from Run Differentials
Bill James invented the Pythagorean expectation formula in the 1980s, and it remains one of the most reliable tools in baseball analytics. The concept is elegantly simple: a team’s true talent level is better reflected by how many runs it scores and allows than by its actual win-loss record.
The formula: Expected Win% = (Runs Scored^2) / (Runs Scored^2 + Runs Allowed^2). A team that has scored 350 runs and allowed 300 through half a season would have an expected win percentage of (350^2) / (350^2 + 300^2) = 122,500 / (122,500 + 90,000) = 122,500 / 212,500 = 0.576, or a 57.6% win rate.
Why does this matter for betting? Because actual win-loss records are noisy. A team might be 40-30 with a run differential that suggests they should be 37-33. The three “extra” wins came from luck in close games — a category where outcomes are essentially random. The Pythagorean record strips out that randomness and gives you a more accurate baseline from which to project future performance.
When I compare a team’s actual record to its Pythagorean record, I am looking for divergence. A team that has overperformed its Pythagorean expectation by five or more wins is a candidate for regression — they are likely to lose more and win fewer going forward. A team that has underperformed is a candidate for improvement. Both scenarios create betting value because the market tends to price teams on their actual record, not their expected record.
The exponent in the original formula is 2, but later refinements (the “Pythagenpat” version) use an exponent derived from the run-scoring environment: exponent = (Runs Scored + Runs Allowed)^0.287. In practice, the difference between using 2 and the dynamic exponent is small, but I use the dynamic version because the additional accuracy costs nothing in spreadsheet complexity.
The Log5 Method: Head-to-Head Win Probability from Team Records
Pythagorean expectation tells you how good a team is in general. The Log5 method, also from Bill James, tells you how likely that team is to beat a specific opponent on a given day. It is the bridge between team-level talent assessment and game-level probability — exactly what you need to compare against bookmaker odds.
The formula: P(A beats B) = (pA — pA * pB) / (pA + pB — 2 * pA * pB), where pA is Team A’s true win probability and pB is Team B’s true win probability. If Team A’s Pythagorean win percentage is .576 and Team B’s is .488, the formula gives: (0.576 — 0.576 * 0.488) / (0.576 + 0.488 — 2 * 0.576 * 0.488) = (0.576 — 0.281) / (1.064 — 0.562) = 0.295 / 0.502 = 0.588. So Team A has a 58.8% chance of winning.
That 58.8% probability converts to decimal odds of 1.70. If your bookmaker is offering Team A at 1.80, you have a value bet — the market is giving you a better price than your model suggests the true probability warrants. If the bookmaker offers 1.62, you are being asked to pay more than the game is worth.
The elegance of Log5 is that it accounts for opponent quality automatically. A .576 team’s probability of beating a .600 team is lower than its probability of beating a .450 team, and the formula captures that without you needing to add subjective adjustments. I run Log5 for every MLB game before checking the bookmaker’s odds — it takes two minutes per game once you have the Pythagorean records populated in your spreadsheet.
Adjusting for the Starting Pitcher: A Simple Overlay Method
The Log5 calculation uses team-level win percentages, which average across all starting pitchers. But today’s game features a specific starter, and that starter might be significantly better or worse than the team’s average. The overlay method adjusts the base probability to account for the individual pitching matchup.
The simplest version: calculate the team’s win percentage when each specific starter pitches (available on most baseball reference sites) and substitute that number for the general team win percentage in the Log5 formula. If Team A is a .576 team overall but .630 when their ace starts and .510 when their fifth starter pitches, using the starter-specific number gives a more accurate game-level probability.
A more refined approach adjusts by the quality gap between today’s starter and the team’s average starter. If the team’s average starter has a 4.00 ERA and today’s starter has a 3.20 ERA, you can calculate the run-prevention improvement and adjust the expected runs allowed in the Pythagorean formula before running Log5. This two-step method — adjusted Pythagorean into adjusted Log5 — produces a probability that reflects both team quality and the day’s specific pitching matchup.
I apply a similar adjustment for the opposing starter. The final probability reflects both teams’ overall quality and both day’s starters. This pitcher-adjusted Log5 is my core model output — the number I compare to the bookmaker’s line for every game.
Comparing Your Projections to Market Odds: Finding Betting Value
A model is only useful if it consistently identifies bets where the market is wrong. The comparison process is mechanical: convert your projected probability to decimal odds, compare to the bookmaker’s posted price, and calculate the expected value.
Expected value formula: EV = (Probability * Payout) — 1. If your model gives Team A a 58.8% chance and the bookmaker offers 1.80, the EV is (0.588 * 1.80) — 1 = 1.058 — 1 = +0.058, or +5.8%. That is a strong positive expected value bet. I typically require at least +3% EV before placing a bet — anything less, and the model’s estimation error could easily erase the edge.
Track every bet your model recommends, whether or not you actually place it. After 200-300 projected bets, you can compare your model’s implied probabilities to actual outcomes. If your model says games are 55% likely and they win 54.5% of the time, the calibration is excellent. If your model says 55% and the actual win rate is 48%, the model is systematically overconfident and needs adjustment.
The beauty of this approach is transparency. Every input is quantifiable, every output is testable, and every mistake is traceable. When I lose a bet, I can look at the model and identify which input was wrong — the team’s Pythagorean record, the pitcher adjustment, or the splits data I fed into the projections. That diagnostic capability turns every loss into a lesson, which is how a crude first-year model evolves into a refined tool over multiple seasons.
Do I need coding skills to build a useful MLB betting model?
No. A spreadsheet application — Excel, Google Sheets, LibreOffice Calc — is sufficient for a Pythagorean expectation and Log5-based model. The formulas involve basic arithmetic and exponentiation, both of which are standard spreadsheet functions. Coding becomes useful if you want to automate data collection or run more complex simulations, but the core model can be built and maintained entirely in a spreadsheet.
How accurate does my model need to be to generate profit?
Your model does not need to be perfectly accurate — it needs to be more accurate than the bookmaker’s implied probabilities on a consistent basis. In practice, a model that correctly identifies the direction of mispricing (overpriced favourite, underpriced underdog) on even 53-55% of its flagged bets can generate profit if the average odds offer sufficient value. Calibration matters more than precision — a model that is systematically 2% too confident will lose money even if its rankings are correct.
Prepared by the Betting on Baseball Games editorial staff.
