Baseball ERA Calculator Formula

Understand the math behind the baseball era calculator. Each variable explained with a worked example.

Formulas Used

Earned Run Average

era = earned_runs * 9 / innings_pitched

Earned Runs per Inning

runs_per_inning = earned_runs / innings_pitched

Variables

VariableDescriptionDefault
earned_runsEarned Runs Allowed35
innings_pitchedInnings Pitched100

How It Works

Earned Run Average (ERA)

ERA is the average number of earned runs a pitcher allows per nine innings. It is the most traditional measure of pitching effectiveness.

Formula

ERA = (Earned Runs / Innings Pitched) x 9

Only earned runs count (errors by fielders are excluded). A lower ERA is better. In modern MLB, an ERA below 3.00 is excellent, 3.00-4.00 is above average, and above 5.00 is poor.

Worked Example

A pitcher allows 35 earned runs in 100 innings.

earned_runs = 35innings_pitched = 100
  1. 01ERA = (35 / 100) x 9 = 0.35 x 9 = 3.15
  2. 02This is an above-average ERA in modern baseball

Frequently Asked Questions

What is a good ERA?

In MLB: below 3.00 is elite (Cy Young level), 3.00-3.50 is excellent, 3.50-4.00 is above average, 4.00-5.00 is average, and above 5.00 is below average.

What counts as an earned run?

An earned run is any run that scores without the aid of fielding errors. If a runner reaches base on an error and later scores, that run is unearned.

Is ERA the best pitching stat?

ERA is widely used but has limitations. Modern analytics prefer FIP (Fielding Independent Pitching), which isolates strikeouts, walks, and home runs from fielding quality.

Ready to run the numbers?

Open Baseball ERA Calculator