When Indiana governor Mitch Daniels announced a budget surplus for the latest fiscal year, the windfall came as good news for his state’s employees, some of whom received bonuses of as much as $1,000. Indiana is not alone. An increasing number of states are reporting black ink. The Associated Press reported that 15 ran surpluses for fiscal 2011, up from 10 the year before. Generally, a surplus is a sign that a state’s economy is getting better. But that metric doesn’t always tell the whole story. It could simply mean that a governor has slashed and burned his way into the black. Checking the balance in a state’s “rainy day” reserve fund is a better way to reveal the real winners. It turns out that the states with the fattest reserve funds these days can thank the booming energy sector, which is being driven by oil and shale gas production. North Dakota and Wyoming have relatively small funds ($386 million and $572 million, respectively). However, in terms of per capita reserves, these two are among the richest in the nation (see map). As for the overall size of the funds, oil-rich Alaska, with its $11 billion in rainy day cash (which works out to $15,000 per person), and Texas, with $5 billion, outstrip them all. Reserves like that can make even the toughest governors smile. —Alex Konrad
This article is from the February 27, 2012 issue of Fortune.