Can I resell real estate in the USA without paying capital gains tax?

Capital gains on US real estate are normally taxable for both residents and non‑residents, but exemptions exist for some primary residences and special structures (e.g. like‑kind exchanges for investors); personal advice is needed.​