California Gov. Jerry Brown (D) signed a $156 billion budget last month. The state anticipates a $4 billion budget surplus this fiscal year. (AP Photo/The Sacramento Bee, Jose Luis Villegas)

Years after a recession hammered state budgets, forcing across-the-board cuts to programs and services, the economic recovery is once again bolstering personal and corporate incomes, and swelling state coffers beyond expectations.

Initial reports show many states ended Fiscal Year 2014 with budget surpluses, thanks to growing tax revenue collections. In some cases, states have hundreds of millions or billions of dollars to spend. Other states pulled in just a few million dollars over the break-even point. But even the smallest surplus is better than the tide of red ink that washed over states during the depths of the recession.

California ended the fiscal year with $1.9 billion left over in its state general fund, Controller John Chiang (D) said last week, the first time the general fund ended with a positive cash balance since 2007, the year before the recession began. The state Department of Finance has projected a $4.2 billion surplus for Fiscal Year 2014-2015, which began July 1.

Ohio netted an $800 million surplus, its fourth straight year of black ink. New Hampshire ended the fiscal year $5.6 million over budget. South Dakota notched its third straight surplus. Indiana, Arkansas and Georgia have all reported nine-figure surpluses just days after the fiscal year ended.

The surpluses, however, aren’t solely positive news. Tax collections in many states are lower than they were last year, when wealthy taxpayers took personal income early in hopes of avoiding the fallout from the fiscal cliff. That gave states an artificial boost in revenue during the last fiscal year, and forced budget analysts in most states to plan for lower revenues the following year.

“When the federal tax laws changed at the end of 2012, there was a significant shift in income out of calendar year 2013 into calendar year 2012,” said Tim Keen, director of Ohio’s Office of Budget and Management. “We spent a lot of time when we made our revenue estimates considering that fact.”

Ohio took in less in the 2013-2014 Fiscal Year than it did over the previous year, but the state still ran a surplus. “We tried to be conservative to make sure our estimates were achievable, and they turned out to be,” Keen said.

Arkansas collected less in sales tax and income tax than in Fiscal Year 2012-2013, but still came in $174 million above projections. New Hampshire’s budget surplus was actually below the $26 million budget analysts had projected. Georgia reported collecting $944 million in corporate tax revenues over the fiscal year after pulling in just $590 million in 2012, yet still below 2008 pre-recession numbers. Arkansas income tax collections were lower than last year, but higher than budget analysts had projected.

California attributes its booming budget to a robust stock market and a dramatically improving economy. By June, the state had just 1,800 fewer jobs than its pre-recession peak.

Still, Gov. Jerry Brown (D) has warned that the capital gains tax revenue that gave the state so much money is fleeting. In the 1990s and early 2000s, at the height of the Internet boom, the state spent much of those capital gains taxes on ongoing programs. When the money evaporated as the stock market cratered, California was left with billions in budget deficits. And even a $4 billion surplus looks small compared with the state’s $156 billion budget Brown signed last month.

“The idea that you’d take this little bitty surplus and go on this big spending spree strikes me as odd,” Brown told The Washington Post in an interview earlier this year. “I think that kind of ping pong budgeting, where first you ping and then you pong, makes no sense. And not only do I think it makes any sense, the vast majority of Californians don’t think it makes any sense.”

“There’s a cautionary tale” in relying on capital gains income, said H.D. Palmer, a spokesman for the California Department of Finance. The tech bubble created “the beginnings of those multibillion-dollar budget deficits that in many respects we’ve just gotten around to closing.”

Kil Huh, director of the State and Local Fiscal Health Project at The Pew Charitable Trusts, said states face an especially acute danger when estimating capital gains tax revenue. “The capital gains portion of the personal income tax is one of the most difficult things to estimate or project correctly,” he said.

Many states are using their surplus dollars to rebuild rainy day funds sapped during the recession. California will sock away $1.6 billion this fiscal year, with more money to come in later years. Ohio’s rainy day account stood at just 89 cents when Gov. John Kasich (R) took office in 2011; today, it’s at $1.5 billion, the statutory limit. Indiana has saved $2 billion in reserve, though its $106 million surplus this year came from $150 million in cuts to programs like state colleges and universities, the Family and Social Services Administration and the Department of Correction.

Not every state has registered a surplus. Virginia Gov. Terry McAuliffe’s (D) administration last week reported the Commonwealth’s budget would come in $439 million below expectations, the first time state revenues have shrunk outside of a national recession, due in part to lower-than-expected capital gains taxes.

Kentucky will experience a $90.9 million budget shortfall in its general fund, and $22.2 million in red ink for the state road fund. Income tax growth has been far lower, at just 0.7 percent, than in the previous three years.

Most states are still clearing their books and accounting for the end of the fiscal year, with final revenue and spending projections to come in the weeks ahead. The full picture of state fiscal health likely won’t be known until near the end of this calendar year.

“A lot of states still haven’t returned to their previous peaks before the recession,” Pew’s Huh said.