What is an ERA calculator?
An ERA calculator works out a baseball pitcher’s earned run average, the single number most often used to summarise how effective a pitcher is at preventing runs. ERA expresses the average number of earned runs a pitcher would allow over a full nine-inning game. A lower ERA is better: it means fewer runs cross the plate while that pitcher is on the mound.
The statistic counts only earned runs — runs that score without the help of a fielding error or a passed ball. Runs that scored because of a defensive mistake are “unearned” and are left out, so ERA tries to isolate the pitcher’s own contribution from the defence behind them.
A short history
Earned run average grew out of the work of statistician Henry Chadwick in the late nineteenth century, who was searching for a fair way to compare pitchers as the relief pitcher became more common. Crediting a starter with every run allowed after he left the game was misleading, so a per-inning rate was needed. The National League adopted ERA as an official statistic in 1912, and it has been a cornerstone of pitching evaluation ever since.
How does the calculator work?
You provide three pieces of information:
- Earned runs — the number of earned runs charged to the pitcher.
- Innings pitched — entered as whole innings plus any leftover outs (0, 1, or 2). Because three outs make one inning, each out counts as one third of an inning.
- Game innings — the length of a regulation game, which defaults to 9 for standard baseball but can be lowered (for example to 7 for a doubleheader game).
The calculator first converts the innings-and-outs entry into a decimal number of innings pitched, then applies the ERA formula.
The ERA formula
Earned run average is defined as:
Innings pitched combine full innings with leftover outs:
In baseball box scores this partial value is sometimes written in “innings.outs” shorthand, where means 65 innings and 2 outs — not 65 and two tenths. Converting the outs as gives the true decimal of innings.
Worked examples
Example 1: a partial inning
A pitcher allows 15 earned runs across 65 innings and 2 outs. The innings pitched come to:
Applying the formula with a 9-inning game:
An ERA of is excellent — this pitcher gives up roughly two earned runs per nine innings.
Example 2: whole innings
Suppose a pitcher gives up 5 earned runs over exactly 10 innings:
Example 3: a custom game length
In a 7-inning game a pitcher allows 4 earned runs over 8 innings:
Notes and practical use
- Division by zero. If no outs have been recorded, innings pitched is and ERA is undefined; the calculator leaves the result blank rather than reporting an infinite value.
- Reading ERA. As a rough guide in nine-inning baseball, an ERA below is very good, around is roughly average, and above is poor — though the thresholds shift with the era and league.
- What ERA misses. Because unearned runs are excluded and defence and luck still influence the number, analysts pair ERA with metrics such as WHIP and FIP for a fuller picture of pitching performance.