Most students will see lower rates -- but the rates will rise in the future if the economy improves as expected.
The legislation is a bipartisan effort. The bill now goes to President Obama, who is expected to sign it into law.
The legislation links interest rates to 10-year Treasury notes and takes away the annual rate determination duty currently performed by Congress.
Undergraduates this fall would borrow at a 3.9 percent interest rate for subsidized and unsubsidized loans. Graduate students would have access to loans at 5.4 percent, and parents would borrow at 6.4 percent. The rates would be locked in for that year's loan, but each year's loan could be more expensive than the last. Rates would rise as the economy picks up and it becomes more expensive for the government to borrow money.
Interest rates would not top 8.25 percent for undergraduates. Graduate students would not pay rates higher than 9.5 percent, and parents' rates would top out at 10.5 percent. Using Congressional Budget Office estimates, rates would not reach those limits in the next 10 years.
Rates on new subsidized Stafford loans doubled to 6.8 percent July 1 because Congress could not agree on a way to keep them at 3.4 percent. Without congressional action, rates would stay at 6.8 percent - a reality most lawmakers called unacceptable.
The compromise that came together during the last month would be a good deal for all students through the 2015 academic year. After that, interest rates are expected to climb above where they were when students left campus in the spring, if congressional estimates prove correct.
The White House and its allies said the new loan structure would offer lower rates to 11 million borrowers right away and save the average undergraduate $1,500 in interest charges.
The Congressional Budget Office estimated the bill as written would reduce the deficit by $715 million over the next decade. During that same time, federal loans would be a $1.4 trillion program.
The Associated Press contributed to this report.