Batting average and ERA calculator
For softball, slo-pitch and baseball. Type a player's numbers: the batting average, on-base percentage, slugging, OPS and ERA work out as you type. Nothing is saved, no account.
The formulas, with an example
Batting average: hits divided by at-bats. A player with 12 hits in 40 at-bats bats .300 (12 ÷ 40). Walks, hit by pitches and sacrifices are not at-bats, so they never lower the average.
On-base percentage: hits, walks and hit by pitches, divided by at-bats plus those walks, hit by pitches and sacrifice flies. The same player, with 5 walks, 1 hit by pitch and 2 sacrifice flies, gets (12 + 5 + 1) ÷ (40 + 5 + 1 + 2) = 18 ÷ 48 = .375.
Slugging: total bases divided by at-bats. A single is 1 base, a double 2, a triple 3 and a home run 4. The 12 hits, 7 singles, 3 doubles and 2 home runs, make 7 + 6 + 8 = 21 total bases: 21 ÷ 40 = .525.
OPS: on-base percentage plus slugging, so .375 + .525 = .900 for this player. One number that counts both getting on base and hitting for power.
ERA: the earned runs a pitcher allows, scaled to a full game. An earned run is a run scored without the help of an error or a passed ball. Multiply the earned runs by the innings in a game, then divide by the innings pitched: 9 earned runs in 21 innings give 9 × 7 ÷ 21 = 3.00 over 7 innings, and 9 × 9 ÷ 21 = 3.86 over 9 innings. Each out is a third of an inning: 5.2 innings means 5 innings and 2 outs, or 5.67 in the math.
Frequently asked questions
Why is a batting average written .300?
By tradition it has three digits after the point and no zero in front: .300 means 3 hits for every 10 at-bats. 1.000 means a hit every at-bat.
Does a walk count as an at-bat?
No. Walks, hit by pitches, sacrifice flies and sacrifice bunts are not at-bats. Walks and hit by pitches do count in the on-base percentage.
7 or 9 innings for ERA?
Use the number of innings in one of your league's games: often 7 in softball and slo-pitch, 9 in baseball. The calculator shows both.
Does Notre Ligue work out these averages for my league?
No. A softball or baseball league on Notre Ligue can keep each player's hits and RBI, game after game, when the option is on. At-bats are not kept there, so neither is the batting average or the ERA.
Are my numbers saved?
No. The math runs in your browser: nothing is sent or kept. Reloading the page clears everything.