Charitable giving continued its upward climb during 2017, breaking another record and demonstrating Americans’ generosity, according to the Giving USA report released Tuesday.

Because of the booming stock market and strong economy in 2017, charitable giving by U.S. individuals, bequests, foundations and corporations surged to $410.02 billion last year, according to Giving USA 2018: The Annual Report on Philanthropy for the Year 2017.

Charitable giving last year increased by 5.2 percent over the revised total of $389.64 billion contributed in 2016, the first time the giving rate has topped $400 billion, according to the report, which was published by the Giving USA Foundation, a public service initiative of The Giving Institute (www.givingusa.org). It was researched and written by the Indiana University Lilly Family School of Philanthropy.

The natural and man-made disasters that struck during 2017—Hurricanes Harvey, Irma and Maria and the mass shooting in Las Vegas—also brought an outpouring of charitable contributions, especially from corporations, according to Amir Pasic of the Lily Family School of Philanthropy.

Disaster planning changed this year, Pasic said. Organizations began ramping up their responses even before natural disasters hit, so that organizations on the ground were better prepared when help was needed.

Giving from all four sources—individuals, bequests, foundations and corporations—increased. Giving from individuals still makes up the bulk (70 percent) of contributions, while corporate donations are the smallest proportion at 5 percent.

There has been speculation that some donors increased their giving at the end of 2017 so they could deduct more of the contributions ahead of the standard deduction increase included in the 2018 tax reform law. “While policy developments may have played some role in charitable giving in 2017, most of the effects of the tax policy changes adopted in late December 2017 likely will affect giving in 2018 and beyond,” the report said.

“At this point it is too early to tell how policy changes will affect giving, but anecdotally we hear charities are holding steady,” Aggie Sweeney, chair of the Giving USA Foundation, said during a press briefing on the report. However, at least one report showed a decline in the first part of the year.

It was also speculated contributions to donor-advised funds would be affected by the change in tax policy, with donors giving large contributions at the end of 2017 and then tapering off after the standard deduction was increased. However, Kim Laughton, president of Schwab Charitable, a donor advised fund, said contributions to Schwab were up 33 percent to $682 million from Jan. 1 through May compared to last year.

“Philanthropists obviously did not give all their donations last year. However, in the future donors may give bigger donations every few years [so they exceed the standard deduction] and then make grants throughout the year,” Laughton said.

Contributions to foundations saw the largest growth, increasing 15.5 percent, based on data provided by the Foundation Center. This growth was driven by extraordinarily large gifts by major philanthropists, including Michael and Susan Dell and Mark Zuckerberg and Priscilla Chan, to their foundations, the report said.

Giving USA divides recipients into nine categories, all of which but international affairs saw increases. For charities involved in international affairs issues, giving declined 4.4 percent after several years of steady growth to almost $23 billion last year.

Contributions to religion; education; human services; foundations; health organizations; public society beneficiaries; arts, culture and humanities, and environmental and animal welfare organizations all increased.

“The broad growth in giving to virtually all charitable subsectors suggests that charities are connecting effectively with their donors and demonstrating their impact and case for support,” Patrick M. Rooney, executive associate dean for academic affairs at the Lilly Family School of Philanthropy, said in a statement. “While it is too soon to know with certainty how recent policy changes may influence when and how much donors give, what is certain is that cultivating and nurturing strong, ongoing relationships with donors will only become more important as the changes to federal tax policy made at the end of 2017 take effect.”

“Americans’ record-breaking charitable giving in 2017 demonstrates that even in divisive times our commitment to philanthropy is solid,” Sweeney said. “Contributions went up nearly across the board, signaling that Americans seem to be giving according to their beliefs and interests, which are diverse and wide-ranging.”