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) / 100

Earned Runs per Inning

runs_per_inning = round(earned_runs / innings_pitched * 1000) / 1000

Earned Runs per 9 Innings

per_game_runs = round(earned_runs / innings_pitched * 9 * 10) / 10

Innings Pitched

innings_display = innings_pitched

Variables

VariableDescriptionDefault
earned_runsEarned Runs30
innings_pitchedInnings Pitched100

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

  • Below 3.00: Excellent (ace-level)
  • 3.00-3.50: Very good
  • 3.50-4.00: Above average
  • 4.00-4.50: Average
  • Above 5.00: Below average
  • Worked Example

    A pitcher allowed 30 earned runs in 100 innings.

    earned_runs = 30innings_pitched = 100
    1. 01ERA = (30 / 100) * 9 = 0.30 * 9 = 2.70
    2. 02This is an excellent ERA

    Ready to run the numbers?

    Open ERA Calculator