A “first-of-its-kind” report released on Tuesday in San Francisco found that the costs of housing homeless people drop by more than half over a few years, following an initial spike when they first find their way into supportive housing.

City analysts tracked costs for 1,818 adults for eight years—the equivalent of about a quarter of the city’s homeless population— with all those people entering supportive housing in the middle of the span from 2007 to 2015.

While they were living on their own in the first years of the study, the costs to the city and other federal and state sources was roughly $19.4 million, which breaks down to an average of about $21,000 per person. (Not all people being tracked have records of accessing services in a given year.) The biggest costs were for urgent care, jail time and behavioral health services.

The report found that costs began to rise due to “rapidly deteriorating conditions” for this population leading up to their entrance into supportive housing, ballooning to about $56 million around 2011. That total reflects costs for things like the ongoing medical care that the population didn’t have while living on the streets.

Then each year the costs to taxpayers went down, with far less spent on emergency room visits and prison time, dropping about 56% to $24.8 million in 2015. It remains to be seen whether the costs will continue to go down, though politicians are already using the report to argue for more resources dedicated to housing the city’s nearly 7,000 homeless residents.

“Homelessness is an epidemic with incalculable human costs,” says city supervisor Mark Farrell, who commissioned the report from the city’s budget and legislative analyst office, in a statement to TIME. “We must work quickly as a city to get the homeless individuals and families off the streets and into housing, so that we can save significant taxpayer dollars and improve people’s lives. We cannot and should not let those with severe mental health and other health needs live on our street and continue to cycle through our extremely expensive emergency and urgent care services.”

The city already spends a healthy amount on homelessness, a perennially hot political issue. At the end of last year, San Francisco Mayor Ed Lee announced the creation of a new department dedicated to fighting homelessness, with an annual $160 million budget and nearly 200 employees. He also said the city would spend $1 billion over the next four years seeking to prevent and end the plight.

The San Francisco Chronicle has organized a media blitz on the topic for June 29, during which local outlets will all run dedicated reports on homelessness in the City by the Bay.

According to the Department of Housing and Urban Development’s annual report, there were about 564,000 people in America who were homeless on any given night in January 2015, a decline of 13% since 2007. California alone accounted for one-fifth of that population, though New York has by far the biggest homeless population of any city and surrounding area.

Get The Brief. Sign up to receive the top stories you need to know right now. Please enter a valid email address. Sign Up Now Check the box if you do not wish to receive promotional offers via email from TIME. You can unsubscribe at any time. By signing up you are agreeing to our Terms of Use and Privacy Policy . This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply. Thank you! For your security, we've sent a confirmation email to the address you entered. Click the link to confirm your subscription and begin receiving our newsletters. If you don't get the confirmation within 10 minutes, please check your spam folder.

Write to Katy Steinmetz at katy.steinmetz@time.com.