Taxes When Selling a Rental Property: What California Landlords Actually Pay

Nobody enjoys this topic, so let's make it worth your ten minutes. The tax bill on selling a rental is different from selling your own home — usually bigger, and built from pieces most owners have never heard named out loud: depreciation recapture, adjusted basis, nonqualified use. The good news is the math isn't mysterious once someone walks you through it, and there are legitimate ways to shrink or defer the bill — including one that applies if the rental used to be your own house. One thing up front: we're a real estate brokerage, not tax advisors. This is the plain-English orientation so you can have a smarter conversation with your tax professional — not a substitute for one.

Quick Answer

When you sell a rental, you generally owe federal capital gains tax on your profit, a separate federal tax of up to 25% on the depreciation you claimed (or could have claimed), and California state tax, which treats the whole gain as ordinary income. The main relief valves are the primary-residence exclusion (if you lived there 2 of the last 5 years), a 1031 exchange (defer by buying another investment property), and the stepped-up basis rules for inherited property.

Start here: the gain is measured from your adjusted basis

The number the IRS taxes isn't 'sale price minus what I paid.' It's sale price (minus selling costs) minus your adjusted basis — and for a rental, that basis has been moving the whole time you owned it. It went up with capital improvements (the new roof, the addition) and it went down every year with depreciation, whether or not you actually claimed it. A landlord who bought at $300,000, put in $40,000 of improvements, and took $80,000 of depreciation has a basis of $260,000 — so a $600,000 sale is roughly a $340,000 gain before selling costs, not $300,000. Dig out your purchase closing statement, your improvement receipts, and your depreciation schedules from past returns; those three piles are the whole calculation.

Depreciation recapture: the part nobody warned you about

Depreciation was the gift while you owned the rental — a paper deduction against rental income every year. At sale, the IRS takes some of it back: the portion of your gain that comes from depreciation is taxed at up to 25% federally, separate from (and usually higher than) the long-term capital-gains rate on the rest. Two things catch people. First, recapture applies to depreciation that was 'allowed or allowable' — meaning if you never bothered to claim it, you can still be taxed as if you had. Second, on a long-held rental the recapture slice is often the biggest single piece of the bill. If you're hearing this for the first time in escrow, it's too late to plan around it — which is why we bring it up before you list, not after.

What California adds on top

The federal side at least gives long-term gains a discounted rate. California doesn't: the state taxes your entire gain — including the recapture portion — as ordinary income at your regular state bracket. On top of that, the Franchise Tax Board generally requires withholding on real estate sales (commonly 3 1/3% of the sale price, or an elected gain-based amount) collected through escrow, which you settle up at tax time. And depending on your income, the federal 3.8% net investment income tax can apply to rental gains too. None of this is a reason to panic — it's a reason to have the numbers run before you pick a sale price and a closing date, because the timing of the sale can move which tax year and bracket the gain lands in.

The escape hatch: when the rental used to be your home

Here's the search that brings a lot of people to this page: 'selling rental property that was primary residence.' If you lived in the property as your main home for at least 2 of the 5 years before the sale, you can generally still claim the primary-residence exclusion — up to $250,000 of gain tax-free, $500,000 married filing jointly — even though it's a rental today. That's a huge window: move out, rent it for up to roughly three years, and sell before the 2-of-5 clock runs out. Two limits keep it honest. Depreciation taken after May 1997 is never excluded — recapture survives. And years the home was a rental before it became your residence can count as 'nonqualified use' that prorates the exclusion down. If you're inside that three-year window right now, the calendar is genuinely part of your sale strategy — this is the one case where 'when should I sell?' has a tax answer, and it's worth a same-week conversation with your tax preparer.

The 1031 exchange: defer it all, with strict rules

If you're selling one investment property to buy another, a 1031 exchange lets you defer the entire tax bill — capital gains and recapture — by rolling the proceeds into a replacement investment property. The rules are rigid and unforgiving:

  1. The proceeds must go through a qualified intermediary — the money can never touch your account, even for a day.
  2. You have 45 days from closing to identify replacement properties in writing.
  3. You have 180 days from closing to complete the purchase.
  4. To defer everything, the replacement generally needs to cost as much as what you sold, with all the equity reinvested.

A 1031 defers tax; it doesn't erase it — the gain carries into the new property's basis. But held until death, deferred gains can be wiped out by the stepped-up basis your heirs receive. That combination is a real strategy, and it's one to build with a tax professional and an intermediary before you open escrow, not during.

Selling to a family member: legal, common, and full of tripwires

You can absolutely sell a rental to your kids or a sibling. What you can't do is dodge taxes with a friendly price. Sell meaningfully below market and the IRS treats the discount as a gift — reportable against your lifetime gift exemption — while a sale at a loss to a related party gets you the worst of both worlds: the loss is disallowed, but the gain would have been taxable. Related-party rules also reach into 1031 exchanges (generally a two-year holding requirement on both sides) and into your buyer's future: their basis comes from what they actually pay, so a bargain price today can mean a bigger taxable gain for them later. And Prop 19 sharply narrowed California's parent-child property-tax break — a transferred rental generally gets reassessed at market value now. Family transfers deserve a real appraisal, a real purchase contract, and a tax professional's sign-off. We handle the brokerage side of family sales regularly; the paperwork being clean is what keeps them friendly.

Inherited the rental? Different article, better news

If you're selling a rental you inherited, stop worrying about decades of someone else's depreciation — inherited property generally gets a stepped-up basis to its value at the previous owner's death, which can shrink the taxable gain dramatically. There are enough moving parts (probate, tenants in place, the step-up paperwork) that we wrote a separate guide for it — see the related articles below.

Frequently asked questions

How much is capital gains tax on a rental property in California?

There's no single rate — the bill stacks three pieces: federal long-term capital gains (0%, 15%, or 20% depending on income) on the appreciation, federal depreciation recapture at up to 25%, and California state tax on the entire gain at your ordinary income bracket. High earners may add the 3.8% net investment income tax. A tax professional can pin your actual combined number in one sitting with your purchase records and depreciation schedules.

Is there a capital gains calculator for selling a rental?

Rough online calculators exist, but rentals are exactly where they mislead — the gain depends on your adjusted basis (improvements and depreciation history), which no generic calculator knows. Our seller net proceeds calculator gives you the sale-side picture: what you'd walk away with before tax. For the tax slice itself, the honest answer is a preparer with your depreciation schedules, not a web form.

Can I avoid capital gains by selling my rental and paying off my own mortgage?

No — what you do with the proceeds doesn't change the tax. Selling a rental to pay off your primary home's mortgage can still be a perfectly rational move (trading a taxed, managed asset for a paid-off roof), but the gain on the rental is taxable either way. The only proceeds-based deferral is a 1031 exchange, and that requires buying another investment property, not paying down your own.

I lived in the house before renting it out. Do I get the $250,000 exclusion?

Very possibly — if you lived there 2 of the 5 years before the sale, the exclusion generally still applies ($250,000 single / $500,000 married), minus two carve-outs: depreciation claimed while it was a rental is still recaptured, and prior rental years can prorate the exclusion down under the nonqualified-use rules. If you moved out less than three years ago, the sale timing matters enormously — get advice now, not at listing time.

Should I just do a 1031 exchange instead of paying the tax?

A 1031 is powerful if you want to stay a landlord — full deferral, and potentially permanent if held until the basis steps up for your heirs. It's the wrong tool if the whole point is to stop being a landlord, since you must buy another investment property on a strict 45/180-day clock. Plenty of our clients look at both and decide paying the tax once is the price of being done. That's a personal call; we'll give you the market side of it straight.