The number of New Yorkers applying for emergency grants to stay in their homes is skyrocketing — as the number of people staying in homeless shelters reached an all-time high last weekend, records show.

There were 82,306 applications for one-time emergency grants to prevent evictions in fiscal 2016, up 26 percent from 65,138 requests the previous year, according to the Mayor’s Management Report.

The city’s fiscal year runs from July 1 to June 30.

Without the aid — which comes from city funds and was approved in roughly two-thirds of the cases — even more families would likely have entered the shelter system.

“I think the need is as high as it’s been over the past several years in terms of folks not being able to afford New York City,” said Giselle Routhier, policy director at Coalition for the Homeless.

The level of need is echoed in the record number of people seeking shelter at city facilities.

On Sunday, Sept. 18, 59,734 people used the city’s shelter system, a total that eclipsed the record of 59,068 set in 2014, officials said. In fact, at least two other days this month also topped the old mark for homelessness.

Officials at the Department of Homeless Services argue there isn’t a direct correlation between evictions and the homeless-shelter population because people enter the system for numerous reasons, including leaving doubled-up apartments.

And they point out the percentage of households receiving emergency assistance edged up in fiscal 2016 by 2.3 percent — meaning more residents were successfully kept in their homes.

“The shelter population more than doubled in the two decades before this administration took over,” said New York City Housing Authority spokeswoman Lauren Gray.

One bit of positive news: Routhier suggested the increase in grant requests could stem from better outreach efforts by the city about its preventative services.

“This should be good news in terms of preventing more people from entering the shelters in future years,” Routhier said.

But records show the city was able to divert fewer applicants from homeless shelters in fiscal 2016 — 12.6 percent, compared with 16.3 percent the year before.

Both figures are a steep drop from the 28.5 percent of applicants who were kept out of shelters in fiscal 2014.

City officials attributed the declining rate to “the continuing effects of the loss of affordable housing over the past decade.”