The budget calls for spending $6.3 billion from the Education Trust Fund on K-12 schools, community colleges, four-year universities and other programs, 5.6 percent more than this year.
Lawmakers voted to give teachers and most other education employees a 4 percent cost of living raise.
Educators have had one cost of living raise since 2007, a 2 percent hike three years ago.
After some changes worked out by a conference committee, the House passed the budget 100-0. The Senate passed it 32-0.
The budget and pay raise bill were sent to Gov. Robert Bentley, who issued statements praising both.