To avoid or reduce capital gains tax when selling a house in California, homeowners can use the primary residence exclusion, complete a 1031 like-kind exchange, improve their home to increase the cost basis, or plan the sale during a lower tax bracket year. These approaches help reduce taxable gains and allow sellers to retain more of their profit while staying compliant with both state and federal requirements.
In California, capital gains tax is managed by the Franchise Tax Board (FTB) and treated as regular income under the state’s progressive tax rates. While the IRS offers federal relief through Section 121 of the Internal Revenue Code, which allows qualified sellers to exclude a portion of their gain on a primary residence, California applies its own calculation standards and does not provide preferential long-term rates. Homeowners who meet the ownership and use tests may still qualify for these federal exemptions while remaining subject to California’s state-level assessment.
Strategic tax planning is equally important in California, where property values and tax implications can be substantial. Coordinating the timing of your sale, documenting all improvements and fair market value (FMV) changes, and consulting a tax professional familiar with Publication 523 and FTB guidelines can help reduce your overall tax exposure and support long-term financial objectives.

What Is Capital Gains Tax on a Home Sale in California?
Capital gains tax in California is taxed as ordinary income at rates ranging from 1% to 13.3%, based on your tax bracket and total income. It is a tax on the profit earned when the sale price of a property exceeds its purchase price, creating what is known as a taxable gain. The Franchise Tax Board (FTB) manages the state portion, while the IRS may apply federal rates of 0%, 15%, or 20%. Because California does not differentiate between short-term and long-term capital gain, understanding both state and federal systems is key to managing overall tax implications effectively.
How to Calculate Capital Gains on a Home Sale in California?
To calculate capital gains on a home sale in California, determine how much profit you earned from selling the property after accounting for your purchase cost, home improvements, and selling expenses. This calculation reveals your taxable gain, which both the IRS and the Franchise Tax Board (FTB) use to assess your tax liability.
Formula:
Capital Gain = Sale Price – Adjusted Cost Basis (including Purchase Price, Improvement Costs, Selling Expenses)
For example, if your sale price is $600,000, your purchase price was $400,000, you spent $50,000 on renovations, and paid $20,000 in selling costs:
- Adjusted Cost Basis = $400,000 + $50,000 + $20,000 = $470,000
- Capital Gain = $600,000 – $470,000 = $130,000
The $130,000 gain falls within a 9.3% rate (taxable income between $70,607 and $360,659) for singles. That equals $12,090 ($130,000 × 9.3%) in state capital gains tax amount, though higher income levels would move you into higher progressive tax rates.
Taxable Gain and California Capital Gains Tax Rates
In California, capital gains tax is based on your total income and filing status since the state treats these gains as regular income under its progressive tax system. Higher-income earners are subject to higher rates, with an additional 1% for personal income above $1 million. These brackets, set by the Franchise Tax Board (FTB), apply to both income and capital gains tax for California residents.
After determining your taxable gain, use the table below to estimate your state tax rate. Locate your income range and filing category to see where you fall.
| Rate | Single | Married Filing Jointly | Married Filing Separately | Head of Household |
| 1% | $0 – $10,756 | $0 – $21,512 | $0 – $10,756 | $0 – $21,527 |
| 2% | $10,757 – $25,499 | $21,513 – $50,998 | $10,757 – $25,499 | $21,528 – $51,000 |
| 4% | $25,500 – $40,425 | $50,999 – $80,490 | $25,500 – $40,425 | $51,001 – $65,744 |
| 6% | $40,246 – $55,866 | $80,491 – $111,732 | $40,246 – $55,866 | $65,745 – $81,364 |
| 8% | $55,867 – $70,606 | $111,733 – $141,212 | $55,867 – $70,606 | $81,365 – $96,107 |
| 9.3% | $70,607 – $360,659 | $141,213 – $721,318 | $70,607 – $360,659 | $96,108 – $490,493 |
| 10.3% | $360,660 – $432,787 | $721,319 – $865,574 | $360,660 – $432,787 | $490,494 – $588,593 |
| 11.3% (plus 1% for income over $1,000,000) | $432,788 – $721,314 | $865,575 – $1,442,628 | $432,788 – $721,314 | $588,593 – $980,987 |
| 12.3% (plus 1% for income over $1,000,000) | $721,315+ | $1,442,629+ | $721,315+ | $980,988+ |
Federal vs. California Tax Treatment Differences
Federal tax law distinguishes between short-term and long-term capital gains, while California taxes all gains as ordinary income under its progressive 1%–13.3% structure. This means sellers may pay higher state tax on property gains, especially in higher income brackets, even when benefiting from lower federal long-term rates. The tables below show how federal rates differ from California’s single-rate approach.
2025 Federal Short-Term Capital Gains Tax Rates
Short-term gains (assets held 1 year or less) follow standard federal income tax brackets:
| Rate | Single | Married Filing Jointly | Married Filing Separately | Head of Household |
| 10% | $0 – $11,925 | $0 – $23,850 | $0 – $11,600 | $0 – $17,000 |
| 12% | $11,926 – $48,475 | $23,851 – $96,950 | $11,601 – $47,150 | $17,001 – $64,850 |
| 22% | $48,476 – $103,350 | $96,951 – $206,700 | $47,151 – $100,525 | $64,851 – $103,350 |
| 24% | $103,351 – $197,300 | $206,701 – $394,600 | $100,526 – $191,950 | $103,351 – $197,300 |
| 32% | $197,301 – $250,525 | $394,601 – $501,050 | $191,951 – $243,725 | $197,301 – $250,500 |
| 35% | $250,526 – $626,350 | $501,051 – $751,600 | $243,726 – $365,600 | $250,501 – $626,350 |
| 37% | $626,351+ | $751,601+ | $365,601+ | $626,351+ |
2025 Federal Long-Term Capital Gains Tax Rates
Long-term gains (assets held more than 1 year) receive preferential federal treatment:
| Rate | Single | Married Filing Jointly | Married Filing Separately | Head of Household |
| 0% | $0 – $48,350 | $0 – $96,700 | $0 – $48,350 | $0 – $64,750 |
| 15% | $48,351 – $533,400 | $96,701 – $600,050 | $48,351 – $300,000 | $64,751 – $566,700 |
| 20% | $492,300+ | $600,051+ | $300,001+ | $566,701+ |
How to Avoid Capital Gains Tax on House Sale in California?
To avoid capital gains tax in California, homeowners can use the primary residence exclusion, complete a 1031 like-kind exchange, raise their cost basis, or time the sale during a lower-income year. Qualifying sellers under Section 121 may exclude part of their gain, while investors can defer tax by reinvesting in another property. California applies these federal rules but still taxes remaining taxable gains, so good documentation and early planning help reduce overall tax implications.

Use the Primary Residence Exclusion
To qualify for the primary residence exclusion, homeowners must meet the ownership and use tests outlined in Section 121. Qualifying sellers can exclude up to $250,000 of gain if single or $500,000 if married and filing jointly. Eligibility requires meeting the two-out-of-five years rule, which means the homeowner must have owned and lived in the property for at least two of the last five years.
This exclusion is especially valuable in California, where significant appreciation can create larger taxable gains. Maintaining records of fair market value (FMV), improvement expenses, and occupancy history helps verify qualification, and any remaining gain is still taxed as ordinary income in California, making early planning essential for reducing tax implications.
Sell the Property as Inherited Property in California
Selling a property as inherited real estate in California can reduce capital gains tax because heirs receive a step-up in basis, which resets the cost basis to the home’s fair market value (FMV) at the time of the decedent’s death. When selling an inherited house, this higher basis often minimizes taxable gains, especially when the property has appreciated significantly.
For example, if the original owner purchased the property for $300,000 and its FMV at inheritance is $700,000, and the heir later sells it for $750,000, the taxable gain is calculated as:
$750,000 sale price – $700,000 stepped-up basis = $50,000 taxable gain
California follows this federal rule but still taxes any remaining gain as ordinary income, so maintaining valuation records and probate documents helps reduce tax implications.
Sell the Property to a Family Member
Selling a home to a family member in California can offer flexibility, but the sale must follow fair market value (FMV) to avoid gift tax issues or misreported taxable gains. If the home is sold below FMV, the difference may be treated as a gift under IRS and California family sale rules.
For example, if the FMV is $700,000 and you sell it to a relative for $600,000, the $100,000 difference may be considered a gift, while your capital gain is still based on your cost basis.
If your purchase price was $400,000 and you made $50,000 in improvements, your basis would be $450,000, and your taxable gain would be:
$600,000 sale price – $450,000 basis = $150,000 taxable gain
Selling at full FMV avoids these complications and reduces the risk of unintended tax implications for both parties.
Claim Partial Exclusion for Unforeseen Circumstances
Homeowners who must sell due to unforeseen circumstances such as job relocation, health issues, or financial hardship may still qualify for a partial exclusion, even without meeting the full two-out-of-five years requirement under Section 121. The IRS prorates the exclusion based on how long the home was used as a primary residence.
For example, a single homeowner eligible for the $250,000 exclusion who lived in the home for 12 of the required 24 months can claim 50% of the exclusion, which equals $125,000. If their taxable gain is $180,000:
Adjusted taxable amount = $180,000 – $125,000 = $55,000
California accepts this prorated federal exclusion but still taxes the remaining gain as ordinary income, so documenting the qualifying event helps minimize tax implications.
Use 1031 Exchanges to Avoid Taxes
A 1031 like-kind exchange allows California investors to defer capital gains tax by reinvesting the proceeds from one investment property into another qualifying property. To use this rule, the replacement property must be identified within 45 days and purchased within 108 days, with a qualified intermediary handling the funds.
If you sell a rental property for $900,000 and your adjusted basis is $300,000, you would normally have a $600,000 gain. With an IRC 1031 exchange, that entire $600,000 is deferred as long as you reinvest in a like-kind property of equal or greater value. Meeting deadlines and documenting the fair market value (FMV) of both properties helps ensure full compliance with federal 1031 rules and minimizes immediate tax implications.
Move to a No-Income-Tax State
Moving to a no-income-tax state can reduce state-level capital gains tax when selling a California property, as states like Florida, Texas, Nevada, and Alaska do not impose income tax on taxable gains. This strategy works when the homeowner changes their legal residency before the sale, following the new state’s tax laws.
For example, if a seller with a $200,000 taxable gain relocates to a no-tax state before selling, they may avoid California’s state income tax on that amount, depending on residency and sourcing rules. Because California closely examines residency changes, proper documentation and timing are essential to lower tax implications and ensure compliance.
How to Reduce Capital Gains Tax When Selling a House in California?
To reduce capital gains tax when selling a house in California, homeowners can increase their cost basis, use capital losses to offset gains, structure an installment sale, and deduct eligible selling expenses. Improvements increase your cost basis and reduce taxable gains, while capital losses can offset what you owe. An installment sale spreads profit over time, and deductible costs like agent commissions, title insurance, and closing fees lower the final gain.

Increase Your Home’s Cost Basis to Reduce Taxable Gains
Lowering your taxable gain in California often begins with increasing your home’s cost basis, since the state taxes capital gains as ordinary income. Qualifying improvements such as renovations, additions, major system upgrades, or structural repairs are added to your original purchase price, creating a higher adjusted basis.
For example, if you purchased the property for $400,000 and invested $60,000 in improvements, your new cost basis becomes $460,000. A later sale at $600,000 results in a taxable gain of $600,000 – $460,000 = $140,000.
Keeping receipts, contractor invoices, and FMV documentation helps support the higher basis and ensures the Franchise Tax Board (FTB) accepts the adjustments, reducing overall tax implications.
Offset Capital Gains with Capital Losses
By applying a tax-loss harvesting strategy, you can offset capital gains in California by applying capital losses from other investments, which directly reduces the amount of gain subject to state and federal tax. Losses from assets such as stocks or mutual funds lower the income reported to the Franchise Tax Board (FTB) and the IRS, making them an effective tool for managing tax liability.
For example, if the sale of your home results in a $140,000 gain and you have $20,000 in capital losses, your adjusted gain becomes $120,000 after applying the loss. Any remaining losses can be carried forward to future years, and maintaining clear investment statements ensures proper reporting and reduces overall tax implications.
Spread Gain Over Multiple Years with an Installment Sale
Reducing your annual taxable income is possible by structuring the sale as an installment sale, where you receive the sale proceeds over time instead of in one lump sum. This method lets you report only the portion of capital gain tied to each yearly payment, which can help you stay in a lower tax bracket under California’s ordinary income rules.
For example, if your total gain is $150,000 and the buyer pays you in equal installments over three years, you would report $150,000 ÷ 3 = $50,000 per year instead of the full amount at once.
Spreading the gain this way often reduces what you owe to both the IRS and the Franchise Tax Board (FTB), and proper documentation ensures the installment structure is fully recognized for tax purposes.
Deduct Eligible Selling Expenses
You can reduce your taxable gain in California by deducting eligible selling expenses, which directly lowers the amount the IRS and Franchise Tax Board (FTB) treats as profit. Eligible selling expenses include:
- Agent commissions
- Title insurance
- Title search fees
- Settlement fees
- Advertising and marketing costs
- Required pre-sale repairs
- Escrow fees
- Transfer tax
- Recording fees
Because not every cost tied to a sale qualifies, expenses such as mortgage interest, property taxes, home staging, moving costs, regular maintenance, and capital improvements cannot reduce taxable gain.
When calculating the benefit, the reduction is simple. For example, selling for $600,000 with $40,000 in eligible selling expenses lowers the taxable amount to $560,000 before subtracting your cost basis. Keeping organized records of these expenses ensures acceptance for deductions and reduces overall tax implications.
Time the Sale of Your House
Choosing the right year to sell your home can meaningfully lower your capital gains tax in California because the tax you pay depends on your income level for that tax year. Since the state applies progressive tax rates, selling during a year with reduced income can place you in a lower tax bracket, which lowers the tax applied to your gain.
For example, a seller whose income falls into the 9.3% bracket for single filers earning $70,607 to $360,659 may face a higher bill if the sale occurs during a year with increased wages or bonuses. Reviewing your expected adjusted gross income makes it easier to plan the best time to sell the house and minimize overall tax implications.
Take Advantage of the Home Sale Capital Gains Tax Exclusion Multiple Times
You can use the home sale exclusion more than once by meeting the ownership and use tests for each sale under Section 121. Each time you live in a home as your primary residence for at least two of the last five years, you may exclude up to $250,000 in gain as a single filer or $500,000 if married filing jointly.
For example, a couple in San Jose who sold a primary residence in 2020 and another in 2023 could claim the $500,000 exclusion for both sales if they satisfied the two-year requirement each time. Tracking your occupancy period and keeping residency documentation ensures compliance with IRS and FTB guidelines and helps lower long-term tax implications.
Primary Residence Capital Gains Exclusion in California
The primary residence exclusion allows California homeowners to lower their capital gains tax by meeting the Section 121 ownership and use tests. You must have lived in the home as your primary residence for two of the last five years, and the exclusion amount differs for single filers and married filing jointly. California follows these federal rules when determining taxable gains, so keeping records of occupancy, improvements, and FMV supports eligibility with both the IRS and the FTB.
IRS Section 121 Exclusion
The IRS Section 121 exclusion lets qualified homeowners remove part of their home-sale gain from taxation, as long as they have not used the exclusion in the past two years. The allowable amount differs for single filers and married couples filing jointly, and the rule applies only to a primary residence. California adopts this federal method when determining taxable gains, so maintaining documentation of residency and improvements helps support the claim.
$250,000 Exclusion Rules
The $250,000 exclusion applies to single filers who meet the Section 121 ownership and use tests for their primary residence. To qualify, the homeowner must have lived in and owned the property for at least two of the past five years and must not have used the exclusion during the previous two-year period.
$500,000 Exclusion Rules
The $500,000 exclusion applies to married couples filing jointly who satisfy the Section 121 ownership and use tests for their primary residence. Both spouses must meet the use requirement, and neither can have claimed the exclusion in the previous two years.
House Ownership and Use Tests
The ownership and use tests determine whether a homeowner qualifies for the Section 121 exclusion on a primary residence. Both tests must be met within the five years before the sale, and they guide how the IRS and the FTB assess eligibility for excluding home-sale gains in California.
- Ownership Test: You must have owned the home for at least two years within the five years before selling.
- Use Test: You must have lived in the home as your primary residence for at least two years in the same five-year window.
- Joint Filers: When married filing jointly, both spouses must meet the use test, while only one spouse must meet the ownership test.
IRS Section 121 Eligibility + Limits
Eligibility for the IRS Section 121 exclusion depends on meeting specific federal rules that determine whether a homeowner can exclude part of their gain from taxation. These limits apply to primary residences only, and California follows the same framework when calculating taxable gains, so understanding each requirement is essential before claiming the exclusion.
- Primary Residence Requirement: The property must be your main home at the time of sale.
- Ownership and Use Tests: You must meet both tests within the five years before selling.
- Two-Year Waiting Rule: The exclusion cannot be used if it was claimed within the past two years.
- Filing Status Limits: Exclusion amounts differ for single filers and married filing jointly.
- Partial Exclusion Option: A reduced exclusion may apply for qualifying unforeseen circumstances.
- Non-qualification Cases: Second homes, investment properties, and properties not used as a primary residence do not qualify.
Partial Exclusion
Some homeowners may still qualify for a partial exclusion even without meeting the full two-year ownership and use requirements if the sale is driven by a qualifying event. The IRS allows the tax exclusion to be prorated based on the time lived in the home, and California applies the same rules when determining the portion of taxable gains that can be reduced.
When Partial Exclusion Applies:
- Job Relocation: A required move that creates a materially longer commute or forces relocation for employment.
- Health-Related Needs: Medical conditions requiring a move or change in living arrangements.
- Unforeseen Circumstances: Events such as divorce, natural disaster, or financial hardship.
- Prorated Amount: The exclusion is calculated based on the portion of the two-year requirement you completed.
- Required Documentation: Proof that the qualifying event directly influenced the decision to sell.
How Are Capital Gains Taxed on Second Homes and Investment Properties in California?
Capital gains on second homes and investment properties in California are taxed by treating the full gain as ordinary income under progressive tax rates, since the state does not distinguish between short-term and long-term gains. Because these properties do not qualify for the primary residence exclusion, the entire profit is taxable. Investment properties may also trigger depreciation recapture, which increases the amount owed. Keeping clear records of your adjusted basis, improvements, and prior depreciation ensures accurate reporting of taxable gains.

Capital Gains Tax on Sale of Second Home
California taxes the gain on a second home at 1-13.3% because the state treats the entire profit as ordinary income and does not offer the primary residence exclusion for this type of property. Your total taxable income for the year determines which bracket you fall into.
For example, if you bought a second home for $470,000, made $30,000 in improvements (new basis $500,000), and later sold it for $900,000, your taxable gain would be $900,000 – $500,000 = $400,000.
Since this capital gain places singles in the 10.3% income bracket ($360,660 – $432,787), their state tax on that gain would be $400,000 × 0.103 = $41,200.
Capital Gains Tax on Investment Properties
Capital gains tax on investment properties in California applies to the full profit from the sale, since the state treats all gains as ordinary income under its progressive tax rates and offers no primary residence exclusion for these properties. Your total taxable income determines the rate applied by the Franchise Tax Board (FTB), and federal rules also require accounting for any prior depreciation, which increases the taxable amount.
For example, if you purchased a rental property for $500,000, made $30,000 in improvements, and later sold it for $590,000, your adjusted basis becomes $530,000, and your capital gain is $590,000 – $530,000 = $60,000.
This capital gain places you in California’s 8% bracket for single filers earning $55,867 to $70,606, where your state tax on the gain would be $60,000 × 0.08 = $4,800, excluding any federal obligations.
What Are the Ways to Reduce Capital Gains Tax on California Investment Properties?
You can reduce capital gains tax on California investment properties by maintaining accurate depreciation and expense records so your adjusted basis is correct and taxable gains are not overstated. A 1031 like-kind exchange can also defer both capital gains and depreciation recapture when completed through a qualified intermediary within the required timelines.
Evaluate Rental Property Tax Implications
Evaluating rental property tax implications in California requires understanding how rental income, depreciation, and capital gains shape your tax liability. Since depreciation reduces your basis and increases taxable gains, keeping accurate records of depreciation, improvements, and expenses is essential for proper reporting to the IRS and the Franchise Tax Board (FTB) and for anticipating taxes when selling.
Adjust for Depreciation Recapture
Managing depreciation recapture effectively helps limit capital gains tax by making sure your adjusted basis reflects the correct amount of depreciation taken over the years. Since the IRS taxes recaptured depreciation at up to 25%, accurate tracking prevents your gain from being overstated and avoids unnecessary tax. Keeping complete records of depreciation and improvements ensures the IRS and the FTB apply recapture only to the right amount, reducing your overall taxable gains when selling a rental property.
Utilize Like-Kind Exchange
A 1031 like-kind exchange allows investors to defer capital gains tax by reinvesting the proceeds into another similar property. To be eligible, a qualified intermediary must handle the funds, the replacement property must be identified within 45 days, and the purchase must be completed within 108 days. This defers both capital gains and depreciation recapture. Keeping clear records of fair market value (FMV), basis, and exchange documents ensures compliance with IRS and Franchise Tax Board (FTB) requirements.
Special Exemptions and Exceptions in California
California offers several exemptions that can reduce or partially exempt capital gains when a homeowner must sell under qualifying circumstances. Relief applies to active-duty military members, job-related relocations, and health-related hardships, allowing sellers who cannot meet the standard ownership and use tests to claim a partial or full exclusion.
Military Service Exemption
Active-duty military members may extend the time allowed to meet the ownership and use tests when selling a home, which helps them qualify for the Section 121 exclusion even after long deployments. This provision pauses the two-out-of-five-year requirement during periods of qualified military service, allowing homeowners to claim the exclusion and reduce taxable gains when reporting to the IRS and the Franchise Tax Board (FTB).
Job Relocation and Health-Related Exemptions
Homeowners who must sell because of job relocation or health-related needs may qualify for a prorated exclusion when they cannot meet the full two-out-of-five-year ownership and use tests. For job-related moves, the IRS considers factors such as the distance to the new workplace and whether the relocation is required for continued employment. Health-related exemptions apply when a sale is needed to obtain medical care or adjust living conditions due to an illness. These exceptions allow eligible sellers to reduce taxable gains during an unexpected or forced sale.
Unlock Tax Savings on Your Property Sale
Achieving meaningful tax savings in a California property sale starts with choosing strategies that fit your situation, whether that means using the Section 121 exclusion, adjusting your cost basis, offsetting gains with losses, or completing a 1031 like-kind exchange for investment properties. Since eligibility depends on how the property was used and whether you meet IRS and Franchise Tax Board (FTB) requirements, planning these steps positions you to reduce taxable gains more effectively.
Strong documentation brings these strategies together, from tracking improvements and depreciation to maintaining fair market value (FMV) and selling-expense records. When paired with expert guidance and thoughtful timing, these measures help homeowners minimize their tax burden and retain more of the proceeds to reinvest or use for future financial goals.
FAQs
How Much Tax Do I Pay When Selling My House?
You pay tax only on your taxable gain, which is the profit from your sale price minus your adjusted basis, unless you qualify for the Section 121 exclusion that removes up to $250,000 (single) or $500,000 (married filing jointly) from taxation. If any gain remains, the IRS applies short-term or long-term capital gains rules, while California taxes the full amount as ordinary income under its 1% to 13.3% progressive tax rates, with higher earners paying more because the state offers no preferential long-term rates.
Do You Pay Capital Gains Taxes When You Sell a Second Home in California?
Yes, you pay capital gains tax on a second home because it does not qualify for the primary residence exclusion, and California taxes the full gain as ordinary income. The IRS may apply long-term preferential rates if you owned it for over a year, but the Franchise Tax Board (FTB) treats the entire gain as standard income regardless of holding period.
Do You Pay Capital Gains if You Lose Money on a Home Sale in California?
No, you do not owe capital gains tax when you lose money on a home sale because a loss produces no taxable gain, and California only taxes profits. However, losses on personal residences cannot be deducted, while losses on investment properties may offset other gains through tax-loss harvesting. Keeping documentation of your sale price, expenses, and basis protects you during IRS or FTB reporting.
How Divorce Affects Eligibility for Exclusions?
Divorce affects eligibility because spouses may still qualify for the $250,000 per-person exclusion based on their individual ownership and use history, even after separation. If the home is transferred to one spouse under the divorce agreement, that spouse may use the former ownership period to meet the two-out-of-five-year rule. Proper documentation ensures the IRS and FTB recognize eligibility during or after the divorce process.
What Exceptions Apply for Relocation, Health, Divorce, or Hardship?
Exceptions apply when a sale is triggered by job relocation, health-related needs, divorce, or financial hardship, allowing a homeowner to claim a prorated Section 121 exclusion even without meeting the full ownership and use tests. Qualifying moves often involve employment distance changes, medical care needs, or major life disruptions that make the sale necessary. These exceptions can significantly reduce taxable gains when properly documented for the IRS and FTB.