On May 17, 2018, Paul DeJong stepped to the plate in a tense situation. The Cardinals were down 4-0 in the eighth, but were rallying — two on, nobody out. On a 2-2 pitch, DeJong saw a pitch inside, and he didn’t exactly get out of the way:

After a replay review, DeJong went to first base. Then, he went to the doctor. The diagnosis: a broken hand. DeJong sat out nearly two months, and when he came back, his power lagged. At the time of his injury, he’d slugged his way to a 125 wRC+ and .213 ISO. The balance of the year, he compiled a 90 wRC+ and a .182 ISO, and the first month back was particularly dire: 59 wRC+ and a Hamiltonian .090 ISO.

Clearly, getting hit by that pitch wasn’t worth it. DeJong is one of the best players in baseball this year, and he was off to a solid start last year before getting hit. If it weren’t for that power-sapping injury, we might be talking about him as a consistent star rather than an out-of-nowhere surprise. At the time, though, it surely made sense to take one for the team. Reaching base there was huge — it increased the Cardinals’ chances of winning the game by almost 10%.

In a full season, a league-average baseball player (think Kevin Pillar or DJ LeMahieu’s 2018) is worth around two wins above replacement. That’s over 600 plate appearances — each trip to the plate adds infinitesimal value. DeJong had a chance to get 1/20th of that value in a single plate appearance, and he didn’t even have to do anything. As the saying goes, “We got ice.” Accepting a hit by pitch to get on base is a time-honored tradition. But is it worth it?

While this question seems pretty straightforward, it’s a thornier problem than it first appears. For example, if a career minor-leaguer, who is only up for the day, is at the plate, it almost doesn’t matter how likely it is that he’ll be injured; it probably makes sense to lean into one. If Mike Trout is at the plate, on the other hand, he should probably be exceedingly cautious. I don’t have all the answers. I do, however, have a theoretical model that should help you know how to feel about any given player taking one for the team.

To start, we’ll need an idea of the likelihood of injury. Anecdotes are great and all, but to judge the likelihood of injury we’ll need more. The DeJong example above is great, but he’s been hit by 18 pitches in his career. Cherry-picking one or two is no way to study this. Luckily, The American Journal of Sports Medicine published an excellent study on HBP injuries last year, and we can use their data.

Between 2011 and 2015, the study counts 361 HBP’s that caused injury in MLB, averaging 11.7 days missed per injury. That gives us a rough baseline for days missed per injury, averaging over the bruised ribs that might result in a precautionary day of rest and the broken hands that linger. Add in the total number of HBP’s from 2011-2015 (7838), and we can work out how likely an injury is to occur each time a batter is hit.

Armed with this data, let’s take our first naive pass at estimating the net benefit of letting yourself get hit. For this example, we’ll use Trout. Trout’s projected 2019 wOBA is .432, while being hit by a pitch clocks in at .720. Through the magic of wOBA, we can work out the run value of that single event — in this case, about a quarter of a run. In other words, every time Trout gets hit by a pitch, that plate appearance is worth .25 runs more to the Angels than a random Trout plate appearance. Not bad!

Next, let’s turn to the dark side. In the study data, about 5% of HBP’s resulted in injury. The average time missed per injury was roughly 11.7 days. In all, getting hit by a pitch costs around half a day lost due to injury, though most HBP’s have no lasting ill effects. For ease of calculation, we’ll assume Trout gets replaced by a replacement-level player and gets 4.5 plate appearances a day, basically his career average.

Sticking with projections, Trout is worth about 8.4 WAR per 600 PA. Do the math, and a half-day absence costs Trout just under a twentieth of a win above replacement. By substituting in this year’s run value for a win, we get that Trout’s absence costs the Angels a third of a run. Whoops! Given that the initial event was worth about a quarter of a run, every time Trout gets hit, the Angels lose expected value.

Well, we’ve established one extreme. Mike Trout shouldn’t lean into a pitch — his continued health is too valuable. Let’s run this again for a 100 wRC+, league-average WAR player. Joe Average has a .316 wOBA, so getting hit by a pitch is more valuable to him — he picks up a full third of a run by hanging an elbow out there. At the same time, Joe’s team doesn’t miss his absence nearly as much — he costs them a tiny fraction of a win through his expected absence. That said, that still works out to .12 runs. Joe Average should lean in, but he doesn’t benefit his team all that much by doing so.

To find a player who should really consider stocking up on body armor and going full Brandon Guyer, we need to get into the fringes of a major league roster. A perfectly average player is a valuable commodity, after all. How about a utility infielder, though? Consider Hernan Perez, the do-everything Brewer who played every position except catcher last year, but hit quite poorly while doing so.

Perez has a .288 career wOBA, so let’s use that in our equation. He projects to be worth about 1 WAR in a full season of games, but he doesn’t play every game. In fact, he has averaged about two-thirds the plate appearances of a regular, so we can ignore one-third of the plate appearances he misses as times when the team already wasn’t planning on using him. Perez’s lean grants him .36 runs over his normal output, a significant upgrade. He then misses fewer at-bats, and his value is easier to replace — in all, his absence costs the team only .03 runs. We’re slicing things thin here, but if Hernan Perez has a chance to get hit, it looks like he should take it.

These examples lack context, though. Trout might pick up .25 context-neutral runs every time he’s hit, but plate appearances don’t come without context. If the Angels are up 10, those runs are meaningless. If they’re in a tie game, they’re incredibly valuable. Let’s redo the analysis, but this time consider how many expected wins being hit adds, rather than how many runs.

To start, consider an extreme situation. It’s the bottom of the ninth, and the Angels are locked in a tie game. The bases are loaded, with two outs, when Trout steps to the plate. Get on base, and the game ends. Make an out, and we’re headed to extras. This is the situation where getting hit is most valuable — if you get hit, you literally win the game.

In a normal plate appearance, Trout is already a great player to have at the plate in this situation. His OBP projection for the balance of the year is .446. Thus, you can think of the chances of the Angels winning the game as .446*1 (he gets on base, they win) plus .554*.5 (he makes an out, the game goes to extra innings and the Angels are 50% to win). This makes the Angels 72.3% likely to win the game at the moment Trout steps into the box. Getting hit increases the chances of a win to, well, 100% — a 27.7% pickup.

In the Trout section above, we worked out that Trout’s expected absence costs the Angels about a twentieth of a win. It looks like it might make sense for any hitter, even Mike Trout, to accept a HBP in the highest-possible-leverage situation. We’ve defined the boundaries — in a normal plate appearance, you need to be a below-average backup for accepting a base to make sense. In the most dramatic possible situation, everyone should do it. What about the spaces in between, though?

Well, this section is going to veer into bad math, but given the speculative nature of this article, I think I’m okay with that. Rather than work out the exact win probability change for each outcome, as we did for the Trout example, let’s just use leverage index. In essence, leverage index measures how important a plate appearance is in terms of swinging the outcome of the game. Average is 1.0, so a plate appearance with a leverage index of 2.0 means that the result of this plate appearance will, on average, change win expectancy twice as much as a random at-bat.

Now, leverage index isn’t perfect. In some situations (like my hypothetical above), a home run is the same as a walk. In others, say second and third with two outs when your team is down by two runs, hits are incredibly valuable and free passes much less so. Still, it gives us a template. Let’s revisit Joe Average using LI.

Joe steps up to the plate to start the bottom of the ninth inning, down 2-0 (LI 1.97). Rather than compute the exact change in win probabilities for each outcome, let’s just multiply his run value by the leverage index. From above, being hit is worth .34 runs. Multiply that by the leverage of the situation, and it’s the equivalent of .68 runs in a context-neutral situation. Since his absence costs his team about .12 runs, the calculus is clear — in high leverage spots, Joe Average should accept a hit by pitch if he wants to help his team win.

Let’s rewrite this as a formula. If you want to know whether it makes sense for any player to take one for the team, you can roughly use this:

(.720- wOBA) / 1.194 * LI – 10.026 * PA/Game * .54 * WAR/PA

A quick breakdown: .720 minus the player’s wOBA gives the extra wOBA accrued by being hit, and dividing it by 1.194 (wOBA scale) puts it into run terms, where it can be multiplied by the leverage of the situation. At 10.026 runs a win and .54 days of expected absence per hit-by-pitch, you can work out the expected run cost of an injury by plugging in the hitter’s playing time and skill level.

There’s still one thing left to cover. Should Paul DeJong have been trying to get hit? Let’s plug it into the formula and find out. When DeJong got hit, the Leverage Index was exactly 2.0. ZiPS projected his 2018 wOBA as .320 before the season (2.1 WAR/600 PA), so we’ve got all the values we need. DeJong earned .67 context-neutral runs by being hit, and his expected absence cost the team a mere .09 context-neutral runs. It was worth it, ex ante, to get hit there.

Now, all of this said, this model isn’t the last word on the subject. It’s extremely approximate, for one. It doesn’t cover any reduced effectiveness that doesn’t involve missing games, a notoriously difficult problem to study. Lastly, it treats getting hit as a binary act that doesn’t interact with the rest of the game. Anthony Rizzo needs to get hit to be Anthony Rizzo — he’s made a career out of standing with two-thirds of his body hanging over the plate to hit outside pitches. Accepting a hit by pitch might sometimes be optional and independent of the rest of the game, but sometimes you can’t disentangle it.

Still, having a rough guess of the benefits and costs of a free trip to first base beats having no idea. Should you get hit by a pitch? Maybe! It depends who you are, and it depends on the game state. The next time you hear an announcer say “We got ice,” know that it’s not that simple. It might be a baseball truism, but without knowing the context, you can never say for sure. There are situations where Mike Trout should get hit by a pitch, and situations where a below-average player should shy away from contact. Nothing in baseball is ever black and white.

*Note: The initial version of this article incorrectly included instance of hit by pitch in both the major and minor leagues; is has been updated to correctly reflect the likelihood of injury due to being hit by a pitch.*