ERA Calculator Formula
Understand the math behind the era calculator. Each variable explained with a worked example.
Formulas Used
ERA
era = round(earned_runs / innings_pitched * 9 * 100) / 100Earned Runs per Inning
runs_per_inning = round(earned_runs / innings_pitched * 1000) / 1000Earned Runs per 9 Innings
per_game_runs = round(earned_runs / innings_pitched * 9 * 10) / 10Innings Pitched
innings_display = innings_pitchedVariables
| Variable | Description | Default |
|---|---|---|
earned_runs | Earned Runs | 30 |
innings_pitched | Innings Pitched | 100 |
How It Works
How ERA Is Calculated
Formula
ERA = (Earned Runs / Innings Pitched) x 9
ERA normalizes to a 9-inning game so you can compare pitchers with different workloads.
Benchmarks
Worked Example
A pitcher allowed 30 earned runs in 100 innings.
earned_runs = 30innings_pitched = 100
- 01ERA = (30 / 100) * 9 = 0.30 * 9 = 2.70
- 02This is an excellent ERA
Ready to run the numbers?
Open ERA Calculator