Okay, so hospitals have a computer called "the chargemaster". It's job is to take in billing codes, time spent doing various things, supplies used (number of band-aids, how many bags of saline, those five Tylenol you took), everything involved in a hospital stay and spit out a huge, outrageous bill.
The computer is a "black box". No one at the hospital knows how much a Tylenol will cost you, nor can they find out. Not even with a billing code.
Now surgery: each surgery is priced differently based on how long you're in the OR and how complicated the surgery turned out to be and how the doctor bills you during pre-op.
With insurance they estimate how much they think it's going to cost, calculate how much you probably owe, and you pay that - up to the limits set by your insurance.
Pl example: tendon moved in my knee, estimated payment to the hospital: 3,000 and change, I paid ~2,500 because that was my out-of-pocket/annual deductible. Total actual bill from the hospital only: over 100,000, including three day stay. (I didn’t pay any more to the hospital, but I still had to pay doctors and home health equipment providers)
Hospitals aren't the only ones to bill you. The anesthesiologist and surgeon and maybe other doctors bill you too and those aren't estimated up front. You just get bills in the mail based on what insurance wouldn't pay.
Now let's say you want to find out how much a surgery you know you need ahead of time is going to cost without insurance to pay for anything: you can't. Even with billing codes. The hospital just can't even get an estimate because of the many variables that go into a surgery and recovery.
My lolyer boss wasn't very happy when I told him that while working as a legal security trying to get money from an insurance company. But best I could get was there's no way to get there from here. Maybe I just bad at my job, but the people I talked to couldn't figure out how to it.