Baseball Magic Number Calculator — NPB & MLB clinch math with head-to-head games
Enter wins, losses, ties and games left (including games left against the leader) to get the magic number to clinch first place on winning percentage, a per-rival breakdown, tie-breaker warning and standings with games behind.
🔒 Runs entirely in your browser. Your input and output are never sent to a server or stored — fully private.
| Team | W | L | T | Left | Left vs target |
|---|
Against each rival
Standings
Each win by the team lowers its magic number by one; a loss by the closest rival usually lowers it too. Head-to-head games count double in a race, because the same game is a win for one and a loss for the other. Winning percentage ignores ties, which is why NPB magic numbers can move in ways a simple formula does not predict.
About this tool
This baseball magic number calculator works out how many more wins a team needs to clinch first place, however its rivals do. Enter each team's wins, losses, ties and games left, plus how many of those games are against the team you are calculating for, and it finds the smallest number of wins that guarantees the best winning percentage even if every rival wins all its other games. Head-to-head games are handled properly — a loss to the rival is a win for the rival — and ties are excluded from winning percentage as in NPB, so it works for Japanese and MLB standings alike. It also shows how many wins are needed against each rival, warns when the last win only avoids a tie-breaker, and builds the standings with games behind. Everything runs in your browser.
Frequently asked questions
How is the magic number calculated in MLB?
With no ties and every team playing the same number of games, the magic number is G + 1 − W − L, where G is the season length (162), W the leader's wins and L the second-place team's losses. A leader at 92-60 with the runner-up at 86-67 has 163 − 92 − 67 = 4: any combination of four leader wins and runner-up losses clinches. This tool reports the same number as wins needed if the rival wins out, and confirms it on the MLB example preset.
Why do NPB magic numbers behave differently?
NPB ranks by winning percentage, wins divided by wins plus losses, with ties left out, and teams can finish with different numbers of decided games. So the simple G + 1 − W − L formula does not apply. Japanese media say a magic number "lights up" when the leader can clinch by winning out regardless of rivals, and it can "go out" again after a loss — and occasionally the second-place team holds the magic number because it has more head-to-head games left. This tool uses that same definition, computed exactly from winning percentages.
Why did the magic number drop by two, or not drop after a win?
A head-to-head win is worth double: the leader gains a win and the rival gains a loss in the same game, so the magic number can fall by two. With winning percentages and ties, a win does not always move the line by exactly one game either: a rival's tie removes a game it could have won, and the leader's own ties change the denominator. That is why the number is recalculated from the full standings rather than decremented, which is exactly what this tool does every time you edit a value.
What is the tragic or elimination number?
It is the magic number seen from the trailing team: the combined number of leader wins and trailing-team losses that eliminates it. In MLB terms it is G + 1 − W(leader) − L(team). In Japan the related idea is losing the chance to win the pennant on your own (jiriki yusho no shometsu): a team can no longer finish first just by winning every remaining game. Select that team as the target here — if the tool says there is no magic number, it has lost its jiriki chance and needs help from other results.
What happens if two teams finish with the same winning percentage?
A tie-breaker decides it. Since 2022 MLB no longer plays a tie-breaker game; ties are settled by formulas starting with head-to-head record. NPB leagues use their own written criteria, such as the number of wins and the head-to-head record. Because these rules differ by league and can change, this tool treats a guaranteed share of first as not yet clinched: it shows the magic number for clinching outright and tells you separately when one fewer win would already guarantee at least a tie.