Selling appreciated real estate in Virginia can trigger a bigger tax bill than most owners expect. A home sale may qualify for the federal home-sale exclusion, but a rental property, farm, inherited property, or mixed-use property can bring in other issues: Virginia income tax, federal capital gains tax, the 3.8% Net Investment Income Tax, depreciation recapture, and special rules for business or investment property.
In this guide, we’ll walk through how capital gains on home and farm sales are taxed in Virginia, how to calculate your gain correctly, and which planning moves can reduce taxes before you sign a contract.
Key Takeaways
- Virginia sellers may face three separate tax layers: federal capital gains tax, Virginia income tax, and possibly the 3.8% Net Investment Income Tax (NIIT).
- Your adjusted basis drives the calculation. If your basis is wrong, your taxable gain is wrong.
- A primary residence may qualify for the Section 121 exclusion, which can exclude up to $250,000 of gain for single filers or $500,000 for married couples filing jointly.
- Farm sales are more complex because the transaction may include land, a farmhouse, barns, equipment, fencing, land improvements, and other depreciable assets.
- If you claimed depreciation on rental, business, farm, or home-office property, part of the gain may be taxed under depreciation recapture rules. Real estate depreciation is generally subject to the unrecaptured Section 1250 gain rules, with a federal rate of up to 25%, while equipment and some farm-related assets may trigger ordinary-income recapture.
- Inherited property usually gets a step-up in basis, which can dramatically reduce capital gains tax.
- A 1031 exchange can defer gain on qualifying investment or business real estate, but not on property held primarily for personal use.
- An installment sale may spread capital gain over multiple years, but it does not treat all gain the same way. Ordinary-income recapture, such as Section 1245 recapture on equipment, generally must be recognized in the year of sale. Unrecaptured Section 1250 gain on real estate may be installment-reported, but it is generally taxed first as payments are received.
- Tax planning works best before closing, not after.
What Is Capital Gains Tax on Real Estate in Virginia?
Capital gains tax is the tax on the profit from selling an asset for more than your adjusted basis. For Virginia real estate sellers, that gain may be taxed at the federal level, the Virginia level, and sometimes through the additional 3.8% Net Investment Income Tax for higher-income sellers.
The key goal is simple: determine your true gain, identify any exclusions or deferral options, and structure the sale before it closes.
How Capital Gains on Real Estate Are Taxed in Virginia
Virginia real estate sellers usually deal with three tax layers.
Layer 1: Federal Capital Gains Tax
If you held the property for more than one year, the gain generally qualifies for long-term capital gains tax rates of 0%, 15%, or 20%, depending on taxable income.
If part of the property was depreciated, that portion may be taxed differently through depreciation recapture or unrecaptured Section 1250 gain rules.
Layer 2: Virginia State Income Tax on Gains
Virginia does not have a special lower capital gains tax rate. For most sellers with meaningful taxable income, taxable gain is effectively taxed at Virginia’s top ordinary income tax rate of 5.75%.
That means even if your federal tax rate on the gain is 15%, Virginia may still tax the same gain at its regular state income tax rate.
Layer 3: Net Investment Income Tax (NIIT)
Higher-income sellers may also owe the 3.8% NIIT. This surtax can apply when modified adjusted gross income exceeds:
- $250,000 for married filing jointly
- $200,000 for single filers and heads of household
- $125,000 for married filing separately
This is often overlooked in large home, rental, and farm sales.
Combined Tax Exposure at a Glance
| Tax | Rate | Who It Applies To | Virginia-Specific? |
|---|---|---|---|
| Federal long-term capital gains | 0%, 15%, or 20% | Sellers with taxable long-term gain | No |
| Virginia income tax | Up to 5.75% | Virginia residents with taxable gain; nonresidents with Virginia-source gain from Virginia real estate | Yes |
| Net Investment Income Tax (NIIT) | 3.8% | Higher earners above MAGI thresholds | No |
| Depreciation-related gain | Federal treatment varies: unrecaptured Section 1250 gain may be taxed up to 25%; Section 1245 recapture may be ordinary income | Sellers who claimed depreciation on rental, business, farm, or home-office property | Virginia generally taxes the federally taxable amount at regular Virginia income tax rates |
Step One for Every Seller: Calculate Adjusted Basis Correctly

Before you estimate tax, you need to calculate adjusted basis. This is where many costly mistakes begin.
What Goes Into Adjusted Basis?
Your basis usually starts with what you paid for the property, then increases for certain capital improvements and decreases for certain tax benefits already claimed.
Your adjusted basis may include:
- Purchase price
- Closing costs that must be capitalized
- Major improvements such as additions, renovations, roofs, or structural upgrades
- Certain legal or survey costs tied to acquisition or improvement
When Basis Is Reduced
Basis is typically reduced by:
- Depreciation allowed or allowable on rental, business-use, farm, or home-office portions of the property
- Certain credits, rebates, subsidies, or reimbursements that reduce the taxpayer’s investment in the property
If you used part of the property for business, farming, or rental purposes, that can materially reduce basis and increase taxable gain.
Inherited Property: The Step-Up in Basis
Inherited real estate generally receives a step-up in basis to fair market value as of the date of death. This is one of the most important tax rules for family homes and farms.
If heirs sell shortly after inheritance, the taxable gain may be minimal because the basis has been reset closer to current market value.
Selling Your Primary Residence in Virginia

The tax treatment of a primary residence is often much better than that of investment or farm property, but only if you qualify.
How the Section 121 Exclusion Works
Section 121 allows eligible sellers to exclude:
- Up to $250,000 of gain if single
- Up to $500,000 of gain if married filing jointly
To qualify, you generally must meet the ownership test and use test. In most cases, you must have owned and lived in the home as your principal residence for at least two of the five years before the sale.
You also generally cannot use the exclusion if you used it on another home sale during the two-year period before the current sale.
If the gain is fully excluded federally, it is generally excluded from Virginia taxable income as well because Virginia begins with federal adjusted gross income.
When You Do Not Fully Qualify
Some sellers may qualify for a partial exclusion if the main reason for the sale is a qualifying life event, such as:
- A job-related move
- Certain health-related reasons
- Certain unforeseen circumstances
This can help sellers who sell before meeting the full two-year ownership and use requirements, or who otherwise do not qualify for the full exclusion.
Nonqualified Use Can Reduce the Exclusion
If the property had periods of nonqualified use, a portion of the gain may not be eligible for exclusion. This issue often arises when a property was used as a rental or investment property before becoming a primary residence.
The rule is technical, but the planning point is straightforward: living in a former rental before selling does not automatically make the entire gain excludable.
However, not all rental use creates the same problem. Rental use before the property became your main home can reduce the Section 121 exclusion. Rental use after you last used the property as your main home is generally treated more favorably, although depreciation claimed or allowable during the rental period still has to be addressed.
Use this expanded version:
Home Office and Rental Portion Depreciation Recapture
If you claimed depreciation for a home office or rented part of the property, that depreciation generally cannot be excluded under Section 121. Depreciation claimed or allowable after May 6, 1997 generally remains taxable even if the rest of the gain qualifies for the home-sale exclusion.
For example, assume you qualify for the full $500,000 home-sale exclusion and your total gain before the exclusion is $300,000. At first glance, you might assume the entire gain is tax-free. But if you claimed $20,000 of depreciation from renting out part of the home or using part of it as a home office, that $20,000 generally cannot be excluded. The remaining $280,000 may still be covered by the Section 121 exclusion, but the depreciation-related gain remains taxable.
The same concept applies even if you should have claimed depreciation but did not. The rule generally applies to depreciation that was allowed or allowable, not just depreciation you actually deducted.
That is a common surprise for taxpayers who assume their entire home sale is tax-free.
IRS Pub. 523 confirms that gain equal to depreciation allowed or allowable after May 6, 1997 cannot be excluded, and IRS guidance also distinguishes between business or rental use within the home and business or rental portions that may require separate reporting. (irs.gov)
Example: Appreciated Northern Virginia Home
Assume a married couple bought a home for $450,000, spent $100,000 on qualifying improvements, and later sells it for $1,000,000. Before considering selling costs, their adjusted basis is $550,000, creating a $450,000 gain.
If they meet the full Section 121 requirements, the $450,000 gain may be fully excluded because it is below the $500,000 married-filing-jointly exclusion limit.
But assume they also claimed $25,000 of depreciation from renting out part of the home or using part of it as a home office. That depreciation-related gain generally cannot be excluded under Section 121. In that case, the couple may still exclude the remaining $425,000 of gain, but the $25,000 depreciation-related portion remains taxable.
This is why a home sale can be mostly tax-free but not completely tax-free when the property had rental or business use.
Selling a Farm or Agricultural Land in Virginia

A farm sale is rarely just a real estate sale. It is often a bundle of different assets, each with its own tax treatment.
Why Farm Sales Are More Complex
A farm may include:
- Personal residence
- Farmland
- Barns and outbuildings
- Fences and land improvements
- Equipment
- Depreciable business assets
Each category may be taxed differently. You cannot assume the whole sale gets one simple capital gains rate.
Splitting the Farmhouse From the Land
In some situations, a seller may be able to use Section 121 on the farmhouse and surrounding qualifying homesite while using 1031 exchange treatment for other qualifying farm real estate held for business or investment use.
This kind of allocation must be handled carefully and documented well. It can create major tax savings when structured properly.
The Recapture Trap: Farm Buildings, Improvements, and Equipment May Not All Be Taxed the Same Way
Farm sales often include more than land. A single transaction may include the farmhouse, farmland, barns, fencing, equipment, and other depreciable assets. Those assets do not all receive the same tax treatment.
Depreciated real estate may produce unrecaptured Section 1250 gain, which can be taxed federally at up to 25%. But equipment, machinery, and some farm-related depreciable assets may trigger ordinary-income recapture under Section 1245. That means the seller cannot assume the entire farm sale is taxed at long-term capital gains rates – or even that all depreciation-related gain is capped at 25%.
This is why allocation matters. The sale price should be broken out among land, residence, buildings, improvements, and equipment before estimating the tax cost.
Inherited Virginia Farms: Timing Matters

Inherited farms often present major planning opportunities because of the step-up in basis. If heirs sell soon after inheriting, gain may be much smaller than expected.
By contrast, gifting the farm during life may transfer the donor’s old carryover basis and create a much larger future tax bill for the recipient.
Example: Shenandoah Valley Farm Sale
Suppose a seller disposes of a farm that includes a farmhouse, acreage, depreciated barns, fencing, and equipment. The farmhouse may qualify for Section 121 if the ownership and use tests are met. The business or investment real estate may qualify for long-term capital gains treatment and may be eligible for a 1031 exchange if the transaction is structured properly. The barns, fencing, improvements, and equipment may each have their own depreciation-related tax treatment, and equipment may produce ordinary-income recapture.
The result is a mixed tax calculation, not one flat number. That is why farm sellers should analyze the asset breakdown before listing the property.
Tax Reduction Strategies Before You Close
The best planning happens before the purchase agreement is final.
1. Maximize the Section 121 Exclusion
If the property is your primary residence, confirm:
- Ownership and use periods
- Filing status
- Improvement records
- Whether any business or rental use affects the exclusion
Sometimes waiting to satisfy the two-year rule produces a dramatically better tax result.
2. Consider a 1031 Exchange

A 1031 exchange can defer gain on qualifying real property held for investment or business use. This can include rental property, farmland held for business or investment, and certain business-use real estate.
It does not apply to a personal residence, inventory, equipment, or property held primarily for sale. It also has strict timing rules, including the 45-day identification period and 180-day exchange period.
3. Use an Installment Sale
An installment sale may spread gain across multiple tax years if the seller receives payments over time. This can help manage bracket exposure and cash flow.
But installment treatment does not treat every category of gain the same way. Ordinary-income recapture – such as Section 1245 recapture on equipment, machinery, and certain depreciable farm assets – generally must be recognized in the year of sale, even if payments are received later.
Unrecaptured Section 1250 gain on depreciated real estate is different. It may generally be reported under the installment method if the installment method otherwise applies, but it is taken into account before regular long-term capital gain. In plain English: the 25% real-estate depreciation layer is usually front-loaded into the earliest installment payments rather than spread evenly behind the lower-rate capital gain.
4. Manage Timing
Timing matters more than many sellers realize.
Consider:
- Whether you have held the property for more than one year
- Whether delaying the sale helps meet Section 121 requirements
- Whether closing in a different tax year improves your income picture
- Whether residency changes affect state tax treatment
5. Evaluate Charitable Planning
For high-value land or farm owners, charitable strategies may deserve attention, including:
- Qualified conservation contributions
- Charitable remainder trusts
These strategies are specialized, but in the right case they can reduce current tax while advancing family or philanthropic goals.
6. Think Carefully About Gifting vs. Holding Until Death
If a family wants to transfer appreciated property, gifting is not always the most tax-efficient move. A gift usually carries over the donor’s basis.
Holding until death may allow heirs to receive a stepped-up basis instead.
How to Report the Sale
Real estate sales often require multiple federal forms.
Federal Reporting
Depending on the facts, the sale may be reported on:
- Form 8949
- Schedule D
- Form 4797
If depreciation recapture or business property is involved, Form 4797 is especially important.
Virginia Reporting
Virginia generally does not have a separate capital gains tax form for ordinary home or farm sale gains. Virginia starts with federal adjusted gross income, so federally taxable gain generally carries into the Virginia return unless a specific Virginia addition, subtraction, or residency allocation rule applies.
Quick Reference: Virginia Home and Farm Sale Tax Rules
| Scenario | Federal Tax Treatment | Virginia Tax Treatment | Key Planning Tool |
|---|---|---|---|
| Primary residence sale gain under exclusion limit | $0 if fully excluded under Section 121 | $0 if excluded from federal AGI starting point | Confirm Section 121 eligibility |
| Primary residence sale gain above exclusion limit | 0% / 15% / 20% on excess gain | Up to 5.75% on excess gain | Maximize basis, consider timing |
| Investment or rental property sale | Capital gains rate + possible unrecaptured Section 1250 gain up to 25% + possible 3.8% NIIT | Up to 5.75% on federally taxable gain | 1031 exchange, installment sale |
| Farm land held for business or investment | Long-term capital gains on land gain | Up to 5.75% on taxable gain | 1031 exchange on land, Section 121 on farmhouse |
| Farm buildings, improvements, and equipment | Mixed treatment: some gain may be capital gain, some may be unrecaptured Section 1250 gain, and some may be ordinary-income recapture under Section 1245 | Up to 5.75% on federally taxable income | Asset allocation, 1031 exchange where available, installment-sale planning by asset type |
| Inherited property | Gain measured above date-of-death value | Virginia generally follows step-up basis treatment | Sell soon after inheritance if appropriate |
| Gifted property | Carryover basis from donor | Same | Compare gifting to estate transfer planning |
Common Mistakes Sellers Make
- Using the wrong basis because improvements were never documented
- Ignoring depreciation recapture on rental, home office, or farm property
- Assuming Virginia has a special low capital gains rate
- Believing an LLC eliminates capital gains tax
- Waiting until after the contract is signed to discuss planning
- Gifting appreciated property without considering lost step-up in basis
- Missing 1031 deadlines, especially the 45-day identification rule
- Treating a farm sale as one asset instead of allocating the sale price among land, buildings, improvements, and equipment
- Assuming installment sales defer all depreciation-related gain, when ordinary-income recapture and unrecaptured Section 1250 gain follow different rules
FAQ
If I qualify for the full $500,000 exclusion, do I still have to report the home sale to the IRS?
Usually, yes – or at least it is often safer to report it.
If you receive a Form 1099-S, you generally should report the sale on your tax return, even if the full gain is excluded under Section 121. Otherwise, the IRS may see gross sale proceeds without seeing the excluded gain calculation.
Even if you do not receive a Form 1099-S, reporting the sale can still be a good idea when the gain is large, the basis calculation is not obvious, the home had rental or business use, or you want a clear record showing why the gain was excluded.
The main point is this: qualifying for the exclusion does not always mean ignoring the sale on the return. It means reporting the sale properly and showing that the taxable gain is zero, when required or advisable.
I rented my home for the past two years and want to sell. Can I still use the exclusion?
Possibly. Renting the home before sale does not automatically kill the Section 121 exclusion if you still meet the two-out-of-five-year ownership and use tests. In many cases, rental use after you last used the property as your main home does not count as nonqualified use for the proration rule.
But depreciation claimed or allowable after May 6, 1997 generally cannot be excluded, even if the rest of the gain qualifies for Section 121.
Can I avoid all capital gains tax by moving the farm into an LLC before selling?
No. Moving property into an LLC does not erase built-in gain. The tax result depends on the underlying ownership, use, basis, and transaction structure, not simply the title-holding entity.
How does the 45-day identification period in a 1031 exchange work?
You generally have 45 days from the sale of the relinquished property to identify replacement property in writing. If you miss that deadline, the exchange usually fails and the gain becomes currently taxable.
You also generally must complete the exchange within 180 days of selling the relinquished property. These deadlines are strict, so the exchange needs to be set up before closing.
My parents want to give me the family farm now rather than leave it in their estate. Is that a good idea tax-wise?
Not automatically. A lifetime gift usually transfers the parents’ carryover basis, which can create a large future capital gain. Leaving the property through the estate may produce a stepped-up basis and lower tax if the property is later sold.
There may be non-tax reasons to gift property during life, but from a capital gains standpoint, gifting appreciated real estate can be expensive if the lost step-up in basis is not considered.
What happens if I sell my farm and move out of Virginia before closing?
Moving out before closing does not make gain from Virginia real estate disappear for Virginia tax purposes. If the farm is located in Virginia, gain from the sale is generally Virginia-source income even if you are a nonresident when the sale closes.
Residency timing can still affect how the rest of your income is taxed, and it can affect filing mechanics. But moving out shortly before closing is not a simple way to avoid Virginia tax on gain from Virginia real estate.
What Every Virginia Seller Should Do Before Signing a Contract
If you are selling a home, farm, or inherited real estate in Virginia, do these three things first:
- Calculate adjusted basis accurately, including improvements and depreciation history
- Classify the property correctly as personal, rental, business, farm, inherited, or mixed use
- Review planning options before closing, especially Section 121, 1031 exchange, installment sales, asset allocation, and timing strategies
The biggest tax savings usually come from decisions made before the sale closes. Once the deal is done, many of the best options disappear.
If your property has appreciated significantly, includes rental or farm use, or came through inheritance or gifting, get the tax analysis done early. That is how you avoid overpaying and make informed decisions before signing away leverage.
Get in touch with us to get professional CPA advice to sell your VA house or farm in the most efficient way.
