FIRPTA is the US federal law that governs tax withholding when a foreign owner sells US real estate. In practice: when a nonresident sells, the closing agent withholds a portion of the gross sale price and remits it to the IRS as a prepayment against the seller's US tax on the sale. The seller then files a US return, and the final tax is settled against the amount withheld, with any excess refunded.
The key points to internalize early: it applies at sale, not at purchase; it is calculated on the sale price rather than the profit, which is why refunds are common; and exemptions or reduced withholding can apply in specific situations, including certain lower-priced sales to buyers who will occupy the property and cases where the IRS approves a reduced amount in advance.
Because withholding mechanics and paperwork have deadlines, the time to plan for FIRPTA is when you buy, not the week you sell. Rangely flags it in every international file and brings in the tax professionals who handle the certificates and filings.