The real cost is for a decent patent attorney to do a prior works search and file it. The problem is, if you go cheap on the attorney, your patent may not be defensible. Figure a minimum of $5,000 for the attorney.
Not only that the US system is so backlogged. If you started the process today, it could take 3-5 years to complete.