What this calculator does
Calculate baseball earned run average from earned runs and innings pitched.
How it works
The calculator evaluates ERA = earned runs × regulation innings ÷ innings pitched. Inputs are checked before calculation, and invalid values such as zero denominators or out-of-range selections produce a clear error instead of a misleading result.
Input query strings and outputs
Use an input name in this page’s URL as ?name=value, and join additional inputs with &. Portable shared links may instead use the compact ?ac= state parameter.
Input query strings
4-
?earnedRuns=Earned runsNumber · Required · Default: 4
-
?wholeInnings=Whole innings pitchedNumber · Required · Default: 7
-
?outs=Additional outsChoice · Required · Default: 2 · Accepted values: 0, 1, 2
-
?gameInnings=Regulation innings per gameNumber · Required · Default: 9
Outputs
2-
eraEarned run averageNumber · Primary output
-
inningsDecimal innings usedNumber
Inputs and results
The inputs are Earned runs, Whole innings pitched, Additional outs, Regulation innings per game. Results include Earned run average, Decimal innings used.