Closing costs are the one-off charges of buying a home, everything you hand over on the day apart from the deposit. In the United States the CFPB lists appraisal fees, title insurance, government taxes and prepaid items among them, and lenders must give you a Closing Disclosure with the final figures at least three business days before closing, according to the CFPB, so you can compare it with the earlier Loan Estimate.
They fall into two groups. The first is tax on the purchase, which is usually the largest single item and is set by law: Stamp Duty Land Tax in England and Northern Ireland, land transfer tax in Ontario, transfer duty in New South Wales. The second is fees for services: the solicitor, notary or conveyancer, the lender's arrangement and valuation fees, surveys and searches. Fees move with the firm you choose; the tax does not.
France folds both into one familiar phrase. What buyers call frais de notaire covers the purchase taxes the notary collects as well as the notary's own regulated fee, and Service-Public sets that fee on a sliding scale from 3.870% of the first €6,500 down to 0.799% of the price above €60,000, before VAT.
Closing costs are not the cash you need to complete. That figure adds the deposit, and any insurance premium you pay in cash rather than add to the loan. Nor are they the costs of selling, which come later and are often larger.
The rent vs buy calculator never asks you for a closing-cost percentage. It takes the tax from your country's own scale and adds a sourced estimate for the other buying costs, and the mortgage calculator shows the same items in its cash-to-complete figure.