#### scottmartin

##### New member

I've been using an ERA (Earned Run Average) calculator to analyze some baseball statistics, and I've come across a question that I'm hoping someone here can help me with.

My understanding is that ERA is calculated by taking the total number of earned runs allowed by a pitcher and dividing it by the total number of innings pitched, then multiplying that by 9. However, I've seen some variations in how this calculation is done, particularly regarding what counts as an earned run.

Could someone clarify what constitutes an earned run in the context of ERA calculation? I've read about errors, passed balls, and other factors that can affect whether a run is earned or not, but I'm still a bit unclear on the specifics.

Additionally, I'm curious about how to handle situations where a pitcher is replaced mid-inning. Do the fractions of innings pitched count towards the total when calculating ERA?