wOBA Calculator

I’m a big fan of Weighted On-Base Average, or wOBA. And if you love baseball statistics, chances are pretty good that you’ve heard of it, or have used it before.

But how do you calculate those darn coefficients? Well, you can get there in about five steps:

1. Find the run value of each event (i.e. linear weight values)
2. Add the run value of the out to all batting events.
3. Multiply the modified run values by the frequency of the event and divide the total sum by plate appearances (sans intentional walks)
4. Solve for the scale needed to match your desired rate (usually between 1.15-1.20).
5. Multiply each modified run value by the scale.

Then you apply the coefficients to the player’s batting line and divide by their plate appearances (again, sans intentional walks), and voilá! You’ve got your wOBA. It’s not super complicated; it just takes a few steps and you’ve got it. Really, the only tricky part is getting the initial run values—and once you have those, you’re set. Luckily for us, we don’t actually have to do any of the work—sites like StatCorner and FanGraphs already do the heavy lifting for us. But what if we want to calculate it ourselves, and have a bit more control over the output?

I’ve put together a nifty little wOBA calculator that does just that. It’ll likely spit out slightly different results than the ones you’ll find on FanGraphs or StatCorner, and that’s because it works a bit differently than they do. First and foremost, I’m allowing you to set the league rate to whatever you would like it to be. One of the criticisms I’ve heard of wOBA is that the rate it’s scaled to (OBP) isn’t as intuitive as, say, batting average. And this is true. So if you feel inclined, plug in your desired league rate—say .260—and you’ve got yourself a weighted batting average. Or, you can keep the OBP scale and set it so that the league average is always set to .330 (that’s a feature of Baseball Prospectus’ TAv that I’ve always admired—no matter the season, you always know what “average” is).

Secondly, I’m excluding stolen bases and caught stealing. This is a personal preference; I prefer to separate value provided by the lumber and value provided on the basepaths. So it will differ from FanGraphs in that regard as well. I’m including reaching base on an error (which can be found on Baseball-Reference under “splits”), and I believe StatCorner does the same.

Thirdly, the calculator generates the linear weight values through a process referred to as the “+1 Method,” which squeezes the run values out of Base Runs (BsR)*, a dynamic run estimator that does an exceptional job at modeling the run-scoring process. The cool thing about BsR is that you can tweak the coefficients to match your run environment (the ones I’m using are ones from Tom Tango’s extensive BsR equation), which the spreadsheet does, and this generates values that closely match the empirical “value-added” method. I’m uncertain as to how StatCorner extracts their run values, but I do know that FanGraphs follows Tango’s approximated run value process. The relative weights used are the same no matter the run environment (i.e. a single is 0.155 runs more than a non-intentional walk, a double 0.3 runs more than a single, a home run held at 1.40, etc.). Using the +1 Method will be a bit more sensitive to the actual frequency of the events, which should provide a modest, albeit small, improvement in theoretical accuracy.

The calculator, of course, will also generate Weighted Runs Above Average (wRAA, or straight Linear Weights), Weighted Runs Created (wRC), and Weighted Runs Created Plus (wRC+). It includes an option for a park adjustment as well. If you’re uncertain as to what the park factor is, just leave it as 1.00.


wOBA Calculator

*The method I use is the same one outlined by Brandon Heipp in his essay on BsR, which I strongly recommend everyone read.

Newest Most Voted
Inline Feedbacks
View all comments
Jeffrey Gross
13 years ago

Brilliant. Love it

Dave Studeman
13 years ago

JT, this is awesome.  I’m still digesting it, but thanks for throwing it together.

9 years ago

If “wOBA fundamentally works because it is a rate stat. Its divisor is plate appearances”, why can’t runs created be determined just by multiplying OBA by PA? In the Understanding Linear Weights link you provided, one version of the runs formula is given as:

LW = .47*1B + .75*2B + 1.04*3B + 1.40*HR + .33*(BB + HBP) + .18*SB – .45*CS – .27* (AB – H)

There are others that incorporate some more events, but they all have this general form. This formula determines total runs created, which, I would think, must be calculated prior to wOBA (just as you must know the number of hits before determining BA, or the number of TB before calculating slugging average). Isn’t wOBA just “runs created per PA” (multiplied by a factor so that it approximates OBP)? In fact, this is made explicit in the wOBA calculator linked in your article (step 3 – divide the total sum by PA).

That being the case, I don’t understand the need for the formula you provided:

(((wOBA – lgwOBA) / wOBAScale) + (lgR/PA)) * PA

How is lgR determined? Wouldn’t it be determined by the LW formula I showed above? And if that is the case, why wouldn’t you just use the same formula to get the runs created for any individual player?

I’m guessing because maybe wOBA is easily available for individual players, whereas runs created is perhaps not? But again, surely you can just multiply by PA?

Let me summarize by providing my understanding, and maybe you can correct me where I’ve missed something:

1) you use a version of the LW formula to determine total or raw runs created for a player
2) you divide these runs by PA to get the raw wOBA
3) you multiply by some constant to get a wOBA that is similar in magnitude to OBP (number of times on base/PA)
4) you determine wRC+ as the ratio of runs created by an individual player to runs created by the average player (with park factors also taken into account). So wRC is a counting stat (but like other value stats, it can decrease as well as increase over PAs), but wRC+ is a rate stat

agar.io hack bot github,agar.io cheats ios,agar.io cheats for ipad mini,agario cheats,agario cheats reddit,agar.io skins mode,agario hack bot no survey,agar.io cheats cydia,agario cheats without download,agar.io hack bot tampermonkey,agar.io skins mobile
8 years ago

When you get bigger, you are going to move slower…you’ll have
to try to eat more tissues to keep your dimension at least
and you could die simpler and that can get frustrating.

7 years ago

Just saw this and checked out the google doc! Very cool stuff! I was just wondering where the following numbers came from:
Are those the linear weights for each outcome? If not, what are they?

MSP hacker
7 years ago