Can You Sell a House With a Lien? Yes, Here Is How
A lien does not block a home sale. Most liens get paid from the sale money at closing. How tax, judgment, and contractor liens work and when to dispute one.
How the $250,000 and $500,000 home sale exclusions work, what tax applies above them, and the partial break for owners forced to sell early.
Quick answer
Most people who sell their main home owe no federal capital gains tax. IRS rules let a single owner exclude up to $250,000 of profit, and a married couple filing jointly up to $500,000, as long as they owned and lived in the home for two of the five years before the sale. Only profit above those limits gets taxed, most often at 15 percent. Owners forced to sell early by a job move, a health problem, a divorce, or a death can usually claim a partial exclusion.
The fear is usually bigger than the bill. Homeowners hear “capital gains tax” and picture the IRS taking a slice of everything the house earned. For most families, the real number is zero. The tax code carves out a large exception for the sale of a main home, and it has since 1997.
The rule sits in Section 121 of the tax code. The IRS explains it in Topic 701: a single filer can exclude up to $250,000 of gain from a home sale, and a married couple filing jointly can exclude up to $500,000. Gain under those caps never appears on a tax bill. Only the amount above them does.
The taxable gain is not the sale price. It is the profit, and the tax code lets sellers shrink that profit in several honest ways before any tax applies.
The math runs like this. Start with the sale price. Subtract selling expenses such as agent commissions, legal fees, and title charges. IRS Publication 523 confirms these costs reduce the amount realized. Then subtract the home’s adjusted basis, which is the original purchase price plus the cost of improvements over the years. A new roof, an added bathroom, a foundation repair, a fence: all of it raises basis and lowers the gain.
What remains is the gain. The exclusion then wipes out up to $250,000 of it for a single owner, or $500,000 for a joint return.
One paperwork note. Sellers who receive a Form 1099-S from the closing must report the sale on Schedule D even when the whole gain is excluded. Sellers who owe nothing and receive no 1099-S generally have nothing to report.
The exclusion has two tests, and both look at the five years before closing.
The ownership test asks whether the seller owned the home for at least 24 months out of those five years. The use test asks whether the seller lived in it as a main home for at least 24 months in the same window. The two years can fall anywhere inside the window, so a family that moved out and rented the place for a while may still qualify.
So the short answer to a common question: owners generally need to have lived in the home for two of the last five years to avoid capital gains tax on the sale. There is also a spacing rule. A seller who used the exclusion on another home within the past two years cannot use it again on this one.
For married couples claiming the full $500,000, either spouse can meet the ownership test, but both must meet the use test.
Gain above the exclusion is taxed as a long-term capital gain when the home was owned for more than a year. Per IRS Topic 409, the rates are 0, 15, or 20 percent, set by taxable income. For the 2025 tax year, the 0 percent rate covered single filers with taxable income up to $48,350 and joint filers up to $96,700. The 15 percent rate ran up to $533,400 for singles and $600,050 for joint filers. Income above that hit 20 percent.
Most sellers with taxable gain land at 15 percent. Sellers who owned the home for a year or less pay ordinary income rates instead, which run higher.
High earners face one more layer. The Net Investment Income Tax adds 3.8 percent when modified adjusted gross income tops $200,000 for singles or $250,000 for joint filers. It only touches the gain above the exclusion. Profit the exclusion shelters stays fully sheltered.
States are their own story. Some tax capital gains as income, and some charge nothing. Sellers should check their own state’s rules before estimating the total.
The search results are full of questions like “how much is capital gains tax on a $500,000 house.” The honest answer: it depends on the profit, not the price. Three examples show the range.
A $500,000 sale. A single owner bought the house for $200,000 years ago and sells for $500,000. After $30,000 in selling costs, the gain is $270,000. The exclusion removes $250,000. Tax applies to $20,000, and at 15 percent that is $3,000. A married couple in the same house owes nothing, because $270,000 sits under their $500,000 cap.
A $300,000 gain. A couple filing jointly excludes all of it. Their federal tax on the sale is zero. A single owner excludes $250,000 and pays tax on $50,000, which comes to $7,500 at the 15 percent rate.
A $100,000 gain. Any qualifying seller, single or married, excludes the full amount and owes nothing.
Notice what drives the bill: profit, filing status, and income. Not the sticker price of the house.
This is where the tax code shows some mercy, and many sellers under pressure never hear about it.
Owners who sell before hitting the two year mark can claim a partial exclusion if the sale happened for certain reasons. Publication 523 lists them. A job change that moves the owner at least 50 miles farther away. A move to get or give medical care. And a category the IRS calls unforeseeable events, which includes a death in the household, a divorce or legal separation, twins or more from one pregnancy, becoming eligible for unemployment, a home destroyed or condemned, and a change in employment that leaves the household unable to pay basic living expenses.
The partial exclusion scales with time. An owner who qualifies and lived in the home for 12 of the required 24 months gets half the cap, which is $125,000 for a single filer. That still covers the entire gain for most short-tenure sales.
Families selling under strain often assume a short ownership period means a painful tax bill on top of everything else. Usually it does not. The hardship that forced the sale is often the exact thing that unlocks the partial break.
Heirs get the friendliest rule in this whole area. When someone inherits a home, its basis resets to the fair market value on the date of the previous owner’s death. The IRS states this in its guidance on inherited property.
That reset erases decades of paper gains. A house bought for $60,000 in 1985 and worth $400,000 at the owner’s death passes to the heirs with a $400,000 basis. If they sell soon after for around that value, the taxable gain is close to zero. No two year residency clock applies to that stepped up amount.
Heirs juggling an estate have more than taxes to sort out, from probate to an emptying house. The guide to selling an inherited house walks through those pieces, and the tax rule above is one less thing to dread.
Divorce touches these rules in three helpful ways.
First, when one spouse transfers the home to the other as part of the divorce, that transfer itself is not a taxable sale. The receiving spouse takes over the existing basis. Second, time counts across the split: a spouse who receives the home can count the years the other spouse owned it toward the ownership test. Third, divorce appears on the IRS list of unforeseeable events, so a couple forced to sell early because of a split can claim the partial exclusion.
The tax rules are the manageable part. Deciding whether to sell, buy the other spouse out, or wait is harder, and the guide to selling a house during divorce covers those choices without the tax jargon.
Three ghosts of old law still haunt search results, and none of them exist anymore.
There is no over-55 exemption. Before 1997, sellers 55 and older could take a one-time $125,000 exclusion. Congress replaced it with the current rules, which apply at every age. Sellers over 65 get the same $250,000 or $500,000 as everyone else, no more and no less.
There is no rollover requirement. The old law let sellers defer tax by buying a more expensive home. That deferral died in the same 1997 change. Nobody needs to buy another house to avoid the tax today.
And there is no six year rule in U.S. federal tax law. That phrase comes from another country’s tax system and drifts into American search results. The U.S. test is two years out of five, full stop.
None of this is tax advice, and a page on the internet cannot see a family’s full picture. Rental history, home office deductions, and past depreciation all change the math, and those situations need a professional’s eyes.
For sellers who want to run their own numbers first, Publication 523 includes step-by-step worksheets for basis, gain, and the partial exclusion. A CPA or enrolled agent can confirm the result for a modest fee, which is money well spent before a six-figure transaction. More reading on the money side of selling lives on the resources page.
The headline holds for most households: the home sale exclusion is one of the most generous breaks in the tax code, and it was built for ordinary families, including the ones selling on their worst timeline instead of their best one.
Tagged #taxes#capital gains
A lien does not block a home sale. Most liens get paid from the sale money at closing. How tax, judgment, and contractor liens work and when to dispute one.
Every cost of selling a house: commission after the 2024 rule change, closing fees, repairs, carrying costs, and how listing, FSBO, and cash sales compare.
Owners can sell a home with a reverse mortgage at any time, and heirs can too. The payoff, the 95 percent rule, and the timelines after a death, explained.
Tell us about the property and we'll call you back with a no-obligation cash offer, usually within 24 hours.
Three fields. No obligation, and no pressure.
No fees. No obligation. We respond within 24 hours.
How we work
Our whole sales process is no-pressure by design: you get a written offer with the math attached, it stays open while you think, and there's no obligation at any point. One follow-up call, then we leave you alone.
We also don't do outbound marketing — none of it. No bandit signs stapled to utility poles, no cold calls interrupting your dinner, no stream of letters filling your mailbox asking to buy your house. If you've been getting those, they aren't from us. We put our effort into being easy to find in search results, plus a few Google ads, so we're here at the moment you decide it's time — and invisible until then.
Ready when you are
Get my cash offer Written offer within 24 hours Email us instead We reply within 24 hoursNo pressure, no obligation — and we never chase you afterward.