ERA formula
ERA = 9 × earned runs ÷ innings pitched. It is the number of earned runs a pitcher allows per nine innings. For leagues that play 7-inning games, such as most high-school baseball and softball, replace 9 with 7.
Box scores write partial innings as .1 and .2 because each out is one-third of an inning. So 6.1 innings is 6⅓ (6.333…) and 6.2 is 6⅔ (6.667). The calculator converts the notation before dividing.
Worked example
A pitcher allows 3 earned runs in 6.2 innings. Innings = 6 + 2 ÷ 3 = 6.667. ERA = 9 × 3 ÷ 6.667 = 4.05.
Treating 6.2 as a plain decimal would give 4.35, which is why the notation matters.
Earned and unearned runs
Only earned runs count. A run is unearned when it scores because of a fielding error or passed ball, as decided by the official scorer. Enter the earned-run total from the box score, not total runs allowed.