SAN JOSE — First, there was a shocking report last spring revealing that homelessness in Santa Clara County cost in excess of a billion dollars every two years. Now, the same firm that calculated those staggering figures has developed a computer model that will identify the most desperate and costly homeless individuals and prescribe cost-saving fixes — including immediate housing.

And because the algorithm, introduced today by a local support group for the homeless, can be employed by any municipality, there are high expectations that counties around the Bay Area and the nation will use Silicon Valley’s “triage tool” to save money while dramatically increasing services to the most troublesome longtime homeless cases everywhere.

“This allows us to focus on those who need the services the most,” said Louis Chicoine, executive director of Abode Services, an agency that provides supportive housing for the homeless. “The people who will get housing are the ones least able to compete in the housing market in the first place. This tool turns all that upside down, and we get to focus our efforts on those with the greatest needs.”

In 2015 a Los Angeles firm — the Economic Roundtable — produced a report for a San Jose agency — Destination: Home, a program of The Health Trust. The document, “Home Not Found: The Cost of Homelessness in Silicon Valley” was the most comprehensive look at homelessness ever done anywhere. It calculated the county had roughly 7,600 homeless people — seventh in the nation — and that included the infamous “Jungle” creek encampment, where 300 people lived in abject squalor, surrounded by stunning regional wealth. The $200,000 report also revealed that the annual cost of homelessness in the county was $520 million.

Now, that study has been used to develop the Silicon Valley triage tool, called “the most accurate screening software that has ever been developed” to predict future costs of individuals whose lives and struggles change dramatically from one year to the next.

“Santa Clara County has been committed to solving our local homelessness crisis by taking a hard look at where we’ve been falling short,” said Jennifer Loving, executive director of Destination: Home. “Today, this tool is our first and best evidence-based resource to not only identify those who are currently suffering, but those who will continue to suffer if we don’t intervene.”

The triage tool analyzes data gleaned from government health departments, jails, hospitals and mental health wards. Using 38 analytical indicators, the tool identifies the costliest long-term homeless cases and gives the people housing that comes with social workers managing special care and counseling that will significantly slice down the price of the most costly cases.

“There are 1,000 Santa Clara County homeless residents identified … as having the highest probability of being long-term high-cost service users,” the report states. “These 1,000 homeless individuals use public services at an estimated cost of $56 million a year. After paying the cost of housing and supportive services, there is an estimated $19,282 per person and $19,282,000 combined yearly reduction.”

Dan Flaming, president of the Economic Roundtable, said the factors the tool analyzes range from serious mental illness to costly, chronic physical maladies, from drug addiction and alcoholism to habitual trouble with the law, from ongoing emergency room visits to hospitalizations.

“Often the costliest individuals self-medicate,” said Flaming, “and their behavior can make them more unstable. Then, they may act out or do something that gets them into trouble — which is how they end up in jail or a mental ward.”

However, it is believed that once the most troubled individuals land in “supportive housing,” things change in big ways.

“Often it is assumed that the most needy people on the streets are the least likely to prevail in housing,” Chicoine said. “But we found that 90 percent will be housed when focused with the right resources, and they retain that housing for many years — if not the rest of their lives.”

Instead of slowly searching out such clients, the triage tool scientifically identifies and ranks the most problematic cases, which helps sculpt treatment plans.

“We have long been trying to identify the high users,” said Ky Le, director of Santa Clara County’s Office of Supportive Housing. “But now that the triage tool is ready, we will simply bring our data sources to it, and then we can develop a precise system,” probably by summer.

Loving said issues of legal privacy will still be adhered to, but the tool will ferret out candidates as they move through the health department, the jails, the Sheriff’s Office, the hospitals and the mental health wards — countywide.

“For decades, anonymity has meant homeless people are suffering in our streets without getting the help they truly need,” Loving said. “This tool will allow our county and counties around our country to identify and serve the most vulnerable folks in their systems while reducing that person’s cost to the system. This is exactly what we want from our government — doing more good more efficiently.”

Contact David E. Early at 408-920-5836. Follow him at Twitter.com/davidearlysr.