(Bloomberg) -- U.S. colleges raised $46.7 billion in the 12 months through June 2018, the ninth straight record year, as the lengthy bull market for stocks helped spur contributions.

Harvard University, the country’s richest school, pulled in the most money at $1.4 billion, according to a study released Monday by the Council for Advancement and Support of Education.

The S&P 500 Index’s 14 percent return in the period may have helped encourage giving from a variety of donors. Three colleges brought in more than $1 billion each. Seven got single gifts of $100 million or more, the highest number of schools receiving contributions of that magnitude. The total, up 7.2 percent from the prior year, came amid uncertainty following changes to the U.S. tax code in December 2017, about halfway through the academic term.

Contributions surged by about two-thirds from donor-advised funds, vehicles offering an immediate tax deduction for a one-time gift while their backers make charitable decisions over time. Some of the richest universities including Stanford and Yale run their own versions of the funds. Donors could itemize their returns for calendar 2017 but not necessarily 2018 due to the tax-law changes, according to the report.

“At that time, the stock market fared well,” said Ann Kaplan, senior director of the survey. “The assets invested in donor-advised funds likely increased due to the strength of the stock market and gifts from them would have increased in any tax climate.”

Among top fund-raisers, second-place Stanford University attracted $1.1 billion and Columbia gathered $1 billion. The University of California at Los Angeles raised $787 million and UC San Francisco took in $730 million.

Some 927 schools responded to the survey, which relied on estimates for institutions that didn’t respond. A smaller number responded to the optional question on the donor funds.

To contact the reporter on this story: Janet Lorin in New York at jlorin@bloomberg.net

To contact the editors responsible for this story: Margaret Collins at mcollins45@bloomberg.net, Josh Friedman, Alan Mirabella

©2019 Bloomberg L.P.