In sports, a magic number is a number used to indicate how close a front-running team is to clinching a season title. It is the total of additional wins by the front-running team, plus additional losses by the rival team, after which it is mathematically impossible for the rival team to capture the title.

A concise formula to calculate the magic number is:

magic number = G + 1 - WA - LB

Where

G is the total number of games in the season
WA is the number of wins team "A" has in the season
LB is the number of losses team "B" has in the season

For example, in Major League Baseball there are 162 games in a season. Suppose the standings are as follows:

Team 	Wins	Losses
"A"	96	58
"B"	92	62

Then the magic number for team "A" to win the division is 162 + 1 - 96 - 62 = 5, since any combination of wins by team "A" and losses by team "B", totalling to 5 make it is impossible for team "B" to win the division title.

External links

Derivation of the concise formula