If you estimate ~20k per homeless person per year * 550,000 homes in the US you get on the order of 11 Billion dollars per year out of something like 7,150 Billion of total government spending.
On the other hand if you look at social security as one way to reduce homelessness it’s vastly more expensive.
I was more acknowledging it's not that easy to put a single number on that spend. The low number is a little over half that 11 billion I mentioned, but you can easily come up with other metrics which provide vastly larger figures.