Higher taxes and an improving economy will boost California’s revenue $2 billion above the income Governor Jerry Brown projected in the budget he signed in June, the state’s fiscal analyst said.

The state’s general fund, which pays for most core operations, will reach $107.4 billion in the year ending June 30, compared with $105.5 billion in Brown’s budget, the independent Legislative Analyst’s Office said yesterday in a report. Under the state constitution, almost all of the additional money will go to education, analyst Mac Taylor said.

The higher figure underscores California’s fiscal turnaround. The state has gone from a $25 billion deficit three years ago to a $3.9 billion surplus going into this fiscal year. Propelled by capital-gains taxes, which vary with the performance of the stock market, along with higher income- and sales taxes, California will have surpluses through at least fiscal 2016, Taylor said.

Brown boosted total spending in the world’s eighth-largest economy by almost 6 percent to a record $156 billion, while depositing $1.6 billion into a rainy-day fund, the first installment since 2007.

Brown, a 76-year-old Democrat, will release his budget proposal for the coming fiscal year in January. His finance office this week said revenue for the fiscal year that began in July is $1 billion above projections.

Voters this month approved a new rainy-day reserve that requires lawmakers to set aside 1.5 percent of general-fund revenue each year, as well as capital-gains taxes that exceed 8 percent of the fund. That’s expected to raise $4 billion in the coming fiscal year, Taylor said. Half must be used to pay off debt.

Through higher income- and sales-tax rates and the newly bolstered rainy-day reserve, California’s creditworthiness has improved more than any U.S. state since the recession ended in 2009. The three biggest rating companies have raised it four times in the past two years, including a Nov. 5 increase by Standard & Poor’s to A+, the fifth-highest mark.