The ERA is calculated using the following formula: ERA = 9 × Earned Runs Allowed / Innings Pitched For example, a pitcher who allows 3 earned runs in 7 innings pitched would have an ERA of 3.86 (9 × 3/7).