California should be popping champagne over a budget surplus, but isn't. Virginia, another state with a surplus, wants to invest, but strategically. Meanwhile, Alaska and a few other states facing red ink are trying to figure out where to cut spending or which taxes to raise.

Most state budgets are nicely in the black, but predictions of weak economic growth are leading states to spend cautiously or to stockpile funds. And in the half-dozen states with deficits, lawmakers increasingly are looking to raise sales taxes, although they could be a weak source of revenue.

Many forecasters predict an economic downturn in the next couple of years, which has made many states reluctant to commit to big, expensive programs — even if they have surpluses. Recent volatility and stock market losses foreshadow less income-tax revenue. And the trend in sales-tax receipts is weakening as consumers turn to untaxed Internet sales and cautious buying habits.

In legislative sessions that start this month, lawmakers face many revenue demands. Education spending, which has not returned to prerecession levels in many states, is among them. Transportation, health care and children's welfare also are priorities.

Oil-patch states are struggling with budget shortfalls. As the price of oil plummets, Alaska, Oklahoma and Louisiana get less revenue from energy taxes. But they aren't alone.

More spending cuts loom in Kansas, despite a sales-tax increase. And in Illinois, already mired in a deficit, lawmakers cannot agree on a budget for this fiscal year, let alone the next.

But most states have surpluses, and while that's a good thing, optimism is tempered by tepid forecasts.

"Many states are worried that states will continue seeing weakness in income and general sales tax revenue collections, in part due to changes in demographics and … spending habits," said Lucy Dadayan, policy analyst for the Rockefeller Institute of Government.

According to an institute report issued in November, state tax revenue rose 6.8 percent in the second quarter of 2015, the final quarter of the fiscal year for 46 states.

The growth was led by increases in personal income taxes. Sales tax collections in the April-June quarter rose 3.2 percent from the comparable quarter in 2014, which was significantly weaker than in the previous four quarters, the report said.

Income tax volatility is figuring into most states' budget calculations, said Brian Sigritz, director of state fiscal studies for the National Association of State Budget Officers (NASBO), which surveys states on their budget situations.

In its most recent survey in the fall, the group predicted "modest state tax revenue growth in fiscal 2016." A big reason: The stock market's increased volatility has left states unable to count on income-tax windfalls.

The prospect of slow revenue growth is forcing states to "make tough choices," Sigritz said.

California was one of five states with more than a 20 percent increase in the collection of personal income taxes in the second quarter of 2015, said the Rockefeller Institute report. Collections grew by $4.9 billion, or 20.6 percent. The extra money prompted California to invest in education and infrastructure.

Democratic Gov. Jerry Brown wants to make extra deposits in the state's rainy-day fund, a proposal that doesn't sit well with some lawmakers, who see urgent spending needs.

Other states with surpluses can also expect fights over what to do with the money.

Minnesota's surplus, for example, prompted Democratic Gov. Mark Dayton to drop talk of possibly raising the gasoline tax to fund transportation. The Arizona Legislature is expected to weigh cutting taxes or restoring money recently cut from K-12 education.

Exacerbating the problem for states is that the often more politically palatable sales taxes aren't delivering their traditional payoff. Sales tax collections are projected to increase by 3.9 percent in fiscal 2016 after growing 5.2 percent in fiscal 2015, NASBO projects. That can leave lawmakers in some states looking to more spending cuts or the politically unpopular income tax to close budget holes this year.