What’s more, the I.R.S. allows hospitals to use broad definitions of community service, including the value of traditional charity — care dispensed free or at a discount to those who cannot pay — and the money hospitals calculate they lose because Medicaidreimburses them less than their costs. Hospitals can also take credit for hosting health fairs, operating some research labs and “donating” their executives’ time to serve on local community boards.

“Nonprofit hospitals may have been founded on the basis of community need but that doesn’t mean they’re not very profitable,” said Gary Young, an author of the New England Journal of Medicine article and a professor at Northeastern University. “Towns are hurting and they see this affluent institution in their midst on lots of land and say, ‘Hey, cough up some money. ”