top of page
blue logo transparent

My Spreadsheet That Helps Me Pay 0% Capital Gains Tax in Early Retirement

  • Writer: Gin
    Gin
  • Mar 13
  • 9 min read

I got really excited when I finished filing our 2025 tax return last week.


You might assume it’s because we’re getting a huge refund.


Nope.


The real reason I was excited?


My tax optimization spreadsheet actually worked.


Last year, I shared a spreadsheet I built to estimate how much long-term capital gains we could realize while staying in the 0% capital gains tax bracket.


I had tested the math every way I could think of. But until you actually file a tax return, you never know if your spreadsheet genius… is actually spreadsheet nonsense.


When we decided to retire early, we knew there would be a long stretch before we could tap retirement accounts or claim Social Security.


We also had zero interest in getting part-time jobs—at least for now.


So our retirement income would come from:

  • savings

  • interest

  • dividends

  • selling investments


And in retirement, taxes become something you actively manage, not something that just happens to you.


Tetris blocks arranged like tax brackets showing the zero percent capital gains bracket

CAPITAL GAINS CAN BE TAX-FREE

As I had mentioned before, the great thing about capital gains—in particular, long-term capital gains—is that it’s possible to legally owe zero federal tax on long-term capital gains. Let me repeat that. Zero federal tax on long-term capital gains.


All that takes is figuring out how much capital gains can be realized while staying within the 0% long-term capital gains tax bracket. In 2025, a married couple filing jointly could realize up to $96,700 in long-term capital gains and pay 0% federal tax on those gains.


For 2026, the limit increases to $98,900.


Nearly $100,000 of gains with zero federal tax? That’s great!


But here’s where things get a little tricky.


THE PROBLEM: ORDINARY INCOME CHANGES EVERYTHING

With our progressive tax system, your ordinary income affects your long-term capital gains tax brackets. Depending on your ordinary income, the threshold 0% capital gains tax bracket could be much smaller.


Although we don’t plan on having ordinary income from wages, we will have interest, short-term capital gains, and unqualified dividends.


Then there’s the standard deduction to consider. In 2025, that amount was $31,500. The standard deduction potentially increases the amount of capital gains exempt from taxes. But that again depends on how much ordinary income is being reported.


In our case, we both worked for a few months in 2025 before finally retiring. Plus, we were collecting interest and dividends. Trying to manually calculate how much long-term capital gains we could realize in the 0% bracket was going to be a pain in the neck.


And I’d be doing this every year for the rest of our retirement. Not a fun thing to do.


THE TAX OPTIMIZER SPREADSHEET THAT SOLVES THE PROBLEM

One of my big projects last year was to create a spreadsheet that would do all the calculations. It took a while, but I finally created one that did exactly what I wanted it to do.


All I had to do was enter our total ordinary income and long-term capital gains, and the spreadsheet shows the estimated tax we’d owe for each. By adjusting the numbers, I could see exactly how much long-term capital gains we could realize within the 0% bracket.


I was so proud of that spreadsheet, I almost did a backflip. Unfortunately, early retirement did not magically grant me gymnastic abilities.


The only problem was that I couldn’t confirm how accurate the calculations were—until I actually filed our tax return.


Now that I’ve just finished our tax return, I’m happy to say the spreadsheet’s calculations seem to be very accurate. It was only a few dollars off.


I’ve already used my updated 2026 spreadsheet to estimate how much in stocks I can sell and not pay taxes. We’re aiming to pay zero taxes—legally, of course—for the 2026 tax season.


If you’d like to try out my spreadsheet, a link is at the bottom of this post.


Estimated tax liability and long-term capital gains optimization spreadsheet example

HOW THE LTCG OPTIMIZATION SHEET WORKS

The spreadsheet will do the following:

  • Estimate ordinary income tax

  • Estimate long-term capital gains tax

  • Calculate how much long-term capital gains can be realized at the 0% tax rate

  • Flag if estimated tax payments will be needed


Note: This spreadsheet only calculates federal tax and assumes no taxes have been withheld from any ordinary income. For simplification, it only uses the standard deduction and does not take into account any other deductions or credits.


ENTERING YOUR INCOME

This is the only section on the worksheet where you will need to enter information.


Screenshot showing where to enter ordinary income and realized long-term capital gains and qualified dividends

Ordinary Income: Enter the total of your ordinary income, which includes, but is not limited to, earned wages, interest from savings and CDs, ordinary dividends, money from side businesses, and gambling winnings. Include any short-term capital gains here as well, since they are taxed at the same rates as ordinary income. Remember, short-term capital gains come from selling stocks held for one year or less.


Realized Capital Gains/Dividends: Enter the total of long-term capital gains and qualified dividends.


The above two are the only pieces of information you’ll need to enter for the spreadsheet to work.


Standard Deduction: The standard deduction for the tax year is pre-populated and differs for Married Filing Jointly or Single Filer. This amount reduces your taxable income and is deducted from your ordinary income first, then long-term capital gains.


UNDERSTANDING THE ORDINARY INCOME TAX BRACKETS

This section shows how your taxable ordinary income is allocated across each federal tax bracket and how much tax is owed at each level.


Screenshot of ordinary income tax brackets and thresholds for 2026

Each tax bracket for ordinary income is listed by row and includes the following:


Min Income and Max Income: Income threshold for each tax bracket. Remember, only the portion of your income that falls within each bracket is taxed at that bracket’s rate.


Tax Rate: Marginal tax rates for each bracket.


Bracket Width: Shows how much of your income fits within each bracket before overflowing into the next highest bracket.


Income Allocated: Amount of your taxable ordinary income that falls within each bracket and will be taxed at that bracket’s rate.


Tax for Bracket: Actual amount of taxes owed for that tax bracket.


UNDERSTANDING THE LONG-TERM CAPITAL GAIN TAX BRACKETS

This section shows how long-term capital gains are layered on top of ordinary income and how much of the 0% capital gains bracket is still available.


Screenshot of long-term capital gains tax brackets and thresholds for 2026

Tax brackets for long-term capital gains follow a similar format to ordinary income tax brackets, with one exception.


Remaining Space in Bracket: Shows how much capital gains can still fit within the bracket. Due to the stacking principle, this value can change according to how much ordinary income is being accounted for.


TAX SUMMARY SECTION

This section pulls everything together, showing your total taxable income, estimated federal tax liability, and how much room remains in the 0% capital gains bracket.


Screenshot of summary section showing the estimated tax liability and how much additional long-term capital gains can be realized tax free

Adjusted Gross Income (AGI): Sum of the Ordinary Income and Long-Term Capital Gains you input at the top of the spreadsheet.


Total Taxable Income: AGI minus the standard deduction. Taxable Income is what falls into the above tax brackets.


Ordinary Income Taxable Portion: Portion of your Total Taxable Income that falls into the Ordinary Income tax brackets. The standard deduction reduces your taxable ordinary income first.


Capital Gains Taxable Portion: Portion of your Total Taxable Income that falls into the Long-Term Capital Gains tax brackets. The standard deduction reduces your taxable long-term capital gains only after ordinary income.


Ordinary Income Tax: Sum of the amounts under the Tax for Bracket column in the Ordinary Income tax brackets.


Capital Gains Tax: Sum of the amounts under the Tax for Bracket column in the Long-Term Capital Gains tax brackets.


Total Federal Tax Liability: Estimated total federal tax owed to good ol’ Uncle Sam.


Estimated Tax Flag: If Total Federal Tax Liability is greater than $1,000, estimated tax payments should be made to avoid penalties. Note: This spreadsheet does not take into account any federal taxes withheld from ordinary income, such as paychecks.


Remaining LTCG in 0% Bracket: Shows how much more long-term capital gains can be realized tax-free. This amount changes based on the ordinary income and long-term capital gains amounts entered at the top of the spreadsheet.


The default amount shown is equal to the upper threshold (Max Income) of the 0% bracket. If, however, no ordinary income is entered, once this threshold is reached, this amount will reset to match the standard deduction. This is due to how the standard deduction reduces any ordinary income first and then long-term capital gains.


If that’s too confusing, all you need to understand is this: With zero ordinary income, you can realize the entire 0% long-term capital gains bracket plus the standard deduction tax-free.


In the above screenshot, that would be: $98,900 + $32,200 = $131,100. That’s a lot of tax-free capital gains!


EXAMPLES: SEEING THE 0% CAPITAL GAINS BRACKET IN ACTION

Now let’s take a look at this spreadsheet in action with actual numbers. You’ll see how the ordinary income and capital gains fill their respective tax brackets.


EXAMPLE 1: $60K ORDINARY INCOME AND $40K CAPITAL GAINS

Screenshot of long-term capital gains optimization spreadsheet, assuming a balanced mix of ordinary income and long-term capital gains

Ordinary Income Taxable Portion near the bottom of the spreadsheet shows that of the $60,000 ordinary income, only $27,800 is taxable. This is due to the $32,200 standard deduction, which always reduces ordinary income first.


Of that $27,800, we can see that the first $24,800 falls within the 10% tax bracket, and the remaining $3,000 falls within the 12% bracket.


Screenshot showing breakdown of taxes owed based on our progressive tax system and marginal tax rates

Ordinary income tax for each bracket

10%: $2,480

12%: $360

Total ordinary income tax: $2,840


In the 0% long-term capital gains tax bracket, notice that there’s only $71,100 remaining space in the bracket instead of $98,900. This is due to the stacking principle of how capital gains are taxed. Ordinary income reduces the available space in the bracket.


In this example, we have $27,800 in taxable ordinary income. So, the available space within the 0% bracket is reduced by that amount.


$98,900 minus $27,800 = $71,100


Fortunately, that’s still more than enough space for the $40,000 in capital gains to fit within. Hence, zero taxes are owed on those capital gains.


Screenshot showing total estimated federal tax liability, including zero taxes owed on long-term capital gains

Looking at the tax summary, we see that a total of $2,840 is owed in taxes.


$2,840 (ordinary income tax) plus $0 (capital gain tax) = $2,840 total federal tax liability.


Because that amount is more than $1,000, estimated tax payments are needed.


We also see that an additional $31,100 in long-term capital gains can still be realized without paying any additional taxes.


EXAMPLE 2: $20K ORDINARY INCOME AND $100K CAPITAL GAINS

Let’s see what happens when you have little in ordinary income but a lot in long-term capital gains.


Screenshot of long-term capital gains optimization spreadsheet, assuming low ordinaryincome and high long-term capital gains

Look at Ordinary Income Taxable Portion and Capital Gains Taxable Portion near the bottom.


Notice that there’s no taxable ordinary income. Remember, the standard deduction reduces ordinary income first. In this example, the $32,200 standard deduction is larger than ordinary income ($20,000), so no taxes are owed on ordinary income.


The remaining $12,200 of the standard deduction then gets applied to long-term capital gains. So, the taxable portion of the $100,000 in capital gains is reduced to $87,800. That amount is small enough to fall completely within the 0% capital gains tax bracket.


Also, notice that the remaining space in that bracket is $98,900. Since there was no taxable ordinary income, the full capacity of the bracket is available.


Screenshot showing zero federal taxes owed and the potential to realize an additional $11,100 in capital gains tax free.

Despite $120,000 in gross income being reported, zero federal taxes are owed! And another $11,100 in capital gains could be realized tax free!


HOW TO USE THE SPREADSHEET FOR TAX PLANNING

Hopefully, you agree that this spreadsheet is pretty cool. Managing taxes well can increase your investment returns just as much as picking great businesses with durable economic moats.


Feel free to download it and plug in your own numbers. Even if you don’t plan to realize capital gains this year, try playing with the inputs. Watching how ordinary income fills the brackets—and how that affects long-term capital gains—makes the tax system click in a way that articles alone usually don’t.


When you’re ready, use the spreadsheet to estimate how much long-term capital gains you can realize tax-free today. Pair it with strategies like capital gains harvesting or Roth IRA conversions to reduce taxes now and in the future.


FREQUENTLY ASKED QUESTIONS

Is this spreadsheet tax advice? No. This spreadsheet is for educational and planning purposes only. It provides estimates based on current federal tax brackets and simplified assumptions. Always consult a qualified tax professional for advice specific to your situation.


Does this spreadsheet include state taxes? No. The spreadsheet estimates federal taxes only. State taxes vary widely and are not included.


Can I use this spreadsheet if I’m still working? Yes. You can enter wages, interest, dividends, and capital gains to see how they interact. However, the tool is especially useful for early retirees and anyone managing income intentionally.


What filing statuses are supported? Versions are available for Married Filing Jointly and Single filers for the 2026 tax year.


Why does ordinary income reduce the 0% capital gains bracket? Because long-term capital gains are stacked on top of ordinary income. Higher ordinary income reduces the amount of capital gains that can fit into the 0% bracket.


DOWNLOAD THE SPREADSHEET

Download the version that matches your platform.


Each file includes two worksheets:

  • Married Filing Jointly

  • Single


Available downloads:

  • Excel – 2026 tax year


  • Apple Numbers – 2026 tax year


Open the worksheet that matches your filing status and enter your numbers at the top, and see exactly how much long-term capital gains you can realize while staying in the 0% bracket.


Disclaimer: This spreadsheet is provided for educational and informational purposes only. It is a simplified estimation tool and should not be considered tax advice. Tax laws and individual circumstances vary, and results may not reflect your actual tax liability. Consult a qualified tax professional for advice specific to your situation.


If you find the spreadsheet helpful—or spot something I can improve—let me know in the comments.


See you at the finish line!

Comments


© 2025 by FIRE before 50

bottom of page