Capital Gains When You Sell a Rental and Buy Another
Buying again does not undo a sale that already closed
Yes, if you sell a rental property and buy another, you generally owe capital gains tax on the sale, even if the new purchase closes a week later. The tax is deferred only when the sale is set up as a 1031 exchange before it closes, with the money sent to an exchange account set up through a qualified intermediary and the replacement acquired within the IRS deadlines.
The pre-closing exchange timeline: 5 parts. The start is free on this page.
Updated November 15, 2026 by Private Exchange Group. 2 minute read. Not tax or legal advice.
The short version
- Reinvesting sale proceeds on your own does not defer tax, because the IRS treats money you receive or control as a completed sale.
- A 1031 exchange must be in place before the sale closes, with the contract assigned to an intermediary and the other party notified in writing.
- After closing, you have 45 days to identify replacement property in writing and 180 days, or your return due date if earlier, to acquire it.
- To defer the full gain, reinvest all net proceeds and replace the debt you paid off, with new debt or added cash.
Why buying another rental does not count by itself
Owners in this spot usually want a better version of what they have: a newer building, a better location, fewer repairs. The instinct is to sell, deposit the money and shop. Tax law sees that as 2 separate events, a sale and a purchase, and the sale is taxed no matter how quickly the purchase follows.
The regulation on deferred exchanges, 26 CFR 1.1031(k)-1(f), says that if you actually or constructively receive money before you receive replacement property, the transaction is a sale. Constructive receipt includes money credited to your account, set apart for you or otherwise made available to you. Money received by your agent is treated as received by you.
What has to be in place before the sale closes
The fix is a qualified intermediary. Under the regulations, the intermediary enters into a written exchange agreement with you, takes an assignment of your sale and purchase contracts, sets up the exchange account for the proceeds and delivers the replacement. Those steps are what turn a sale and a purchase into one exchange in the eyes of the IRS.
- Exchange agreement signed
- A written agreement with the qualified intermediary, signed before the relinquished property transfers, which limits your right to receive or borrow against the money during the exchange.
- Contract assigned
- Your rights in the sale contract are assigned to the intermediary. The regulations require all parties to be notified in writing on or before the transfer date.
- Proceeds go to the intermediary
- At closing the net proceeds are wired to the intermediary's escrow, never to you. At PEG each client has a separate escrow account.
- Replacement plan started
- Know the property type, market and price range you are targeting, and ideally have candidates in view, before the 45-day clock starts running.
Before closing or not at all
Three ways the tax comes back
You take cash out
Cash you keep from the sale is taxed up to the amount of your gain.
You buy for less
Buying for less than the net price you sold for leaves value behind, and that part is taxed.
The loan gets smaller
A loan you pay off and do not replace with new debt or your own cash counts the same as cash received.
General rules, not tax or legal advice.
The clock once your sale closes
Section 1031(a)(3) sets 2 deadlines from the day you transfer the property you sold. You have 45 days to identify replacement property in a signed writing, and you must acquire it by the earlier of 180 days or the due date of your tax return for that year, including extensions. Weekends and holidays count. The deadline calculator shows both dates.
Identification usually means up to 3 properties, though the regulations allow other methods. The return due date catches people who sell late in the year: for a sale in November, day 180 falls after the usual April deadline, so filing an extension may be needed to keep the full 180 days. Ask your CPA before you file.
Spending matters as much as timing. Any cash left over is taxable boot, and so is debt relief that you do not replace with new debt or added cash. To defer the whole gain, owners generally buy at equal or greater value and reinvest every dollar of net proceeds.
If the sale has already closed
If the money has already reached you, that sale cannot become an exchange. The regulation treats it as a sale, and buying another property afterward does not change that. For that reason PEG asks owners to call before they sign a contract, while the exchange can still be set up.
What you can still do is plan. Have your CPA estimate the tax on the sale you made, and if you expect to sell another investment property later, set that exchange up properly from the start. The page on exchanges after closing explains the rule in more detail.
Questions people ask
If I put the sale money in my bank account for a few days can I still do a 1031?
No. Once the proceeds are in your account, you have actually received them, and the regulations treat the transaction as a sale even if you buy replacement property within days. The money has to go straight from closing to a qualified intermediary under an exchange agreement signed before the sale closed. There is no grace period for sending it back.
Does the new rental have to be in the same state as the one I sold?
No. Investment real estate in one state is generally like-kind to investment real estate in another, so you can sell in one state and buy in another. Property outside the United States is a different matter under Section 1031(h). PEG handles multiple state exchanges, and your CPA can tell you how each state treats the sale.
Do I have to spend all of the money from my sale to avoid paying tax?
To defer all of it, generally yes. Any net proceeds you do not reinvest come back to you as boot, and boot is taxable up to the amount of your gain. Debt matters too: if your new loan is smaller than the one you paid off and you do not add cash, the difference can be taxable. A partial exchange still defers the rest.
Can I buy the new rental first and sell my old one afterward?
Yes, but it is a different structure called a reverse exchange, and it has to be arranged before you buy. In a standard exchange you sell first and buy second. Reversing the order takes more planning and a structure built for it, so start the conversation with an intermediary as soon as you spot the property you want.


Know where you stand before you close
Tell us when the sale closes and what you own. You will hear where you stand and what has to happen first.
- Whether the property qualifies
- Your 2 deadlines on a calendar
- What your closing agent needs
Asking commits you to nothing. It keeps the option open.
