Tax-Gain Harvesting

Tax Gain Harvesting

In my tax-loss harvesting article, I explain how you can lower your tax bill by selling (and then rebuying) investments that are trading at a loss and using those losses to reduce your ordinary taxable income.

Tax-gain harvesting is similar but rather than selling your losers, you instead sell investments that have appreciated.

You may be wondering how a taxable event like that could be beneficial. I’ll explain…

Cost Basis

When you buy an investment, the value of that investment at the time you buy it is called the cost basis.

The cost basis is used to determine how much tax you need to pay when you eventually sell the investment.

For example, if you purchase a share of VTSAX for $100, the cost basis for that share is $100. If that share is then sold for $110, you would have a $10 capital gain, since there is a $10 difference between the selling price and the cost basis.

The purpose of tax-gain harvesting is to increase your cost basis so that when you eventually sell your investments, you have less capital gains taxes to pay (in the event your investments appreciate) or you have a larger loss to harvest (if your investments instead go the other way).

Calculate Your Net Worth
Calculate Your Net Worth

Automatically calculate your net worth, asset allocation, and investment fees with this free portfolio manager!

Tax-Gain Harvesting Example

Taking the example from the tax-loss harvesting article, let’s see how tax-gain harvesting would improve things.

Instead of doing nothing during the years his investments are increasing, the lab rat decides to harvest his gains.

Therefore, at the end of each year his investments rise (i.e. 2004, 2005, and 2006), he sells and then immediately repurchases the same assets.

Harvest both gains and losses for tax purposes

As you’ll recall from the tax-loss harvesting article, the lab rat eventually harvested his losses at the end of 2008.

In that article, the average cost basis for his investments at that time was $26.42 per share so when he sold his investments at the end of 2008, he was able to book over $14,000 worth of losses.

By tax-gain harvesting in the years leading up to the crash, he would have been able to increase his average cost basis from $26.42 all the way up to $29.74 per share!

That means, when he harvested his losses at the end of 2008, he’d lock in over $21,000 of losses (instead of only ~$14,000, without tax-gain harvesting).

Those $21,000 of losses could then be used to lower his taxable income by $3,000 for the next 7 years!

Capital Gains Taxes

You may be wondering, won’t he have to pay tax on those gains each year and won’t that decrease the benefit of this strategy?

Luckily, the answer in this case is no!

Based on the lab rat’s adjusted gross income, he’s in the 0% tax bracket for qualified dividends and long-term capital gains.

In 2022, a single person could earn up to $41,675 and a married person (filing jointly) could earn up to $83,350 before paying any taxes on long-term capital gains. Full details here.

Therefore, the lab rat is able to sell his investments for a gain, repurchase the same investments at a higher cost basis, and pay $0 of tax for the privilege of doing so!

Long-Term Capital Gains

One thing you’ll want to keep in mind is that you shouldn’t sell investments that you’ve held for less than a year. If you do, you’ll likely be hit with short-term capital gains rates, which are much higher.

By waiting at least a year to sell your investments, you’ll be able to pay a lower long-term capital gains tax rate (and potentially pay nothing at all, if you’re in the 0% long-term capital gains tax bracket).

Follow the Mad Fientist on Twitter

Wash Sale Rule

You may remember from the tax-loss harvesting article that there are rules about what you can purchase immediately after selling an investment for a loss.

Luckily, these wash-sale rules don’t apply when selling an investment for a gain. Since you always pay tax when selling a gain (the tax just happens to be 0% in this example), you can immediately buy the same asset again.

Conclusion

For someone in the 0% long-term capital gains tax bracket, tax-gain harvesting is a no-brainer. Just make sure that you don’t sell so many investments that you end up getting bumped up to a higher tax bracket!

Related Post

FI Laboratory
Chart Your Progress to Financial Independence!

Calculate your FI date and graph your progress to FIRE for free in the Mad Fientist's FI Laboratory!

68 comments for “Tax-Gain Harvesting

  1. Justin
    October 28, 2013 at 1:29 pm

    Wait, why is the Lab Rat in the 15% tax bracket? In the original article he’s making $60k a year, and the article even explicitly says, “If we assume that he is single with no children, he should be taxed $8,600 per year on his wages, for a marginal federal tax rate of 25%.”

    I’m assuming for this article he’s maxing out a 401k and IRA, that’s $23,000 in tax deferred income, so then he’s at $37k taxable… then we subtract the $6,100 standard deduction and he’s at $30,900. Is this the rationale behind saying he’s in the 15% bracket?

    • The Mad Fientist
      October 28, 2013 at 8:08 pm

      Sorry Justin, I should have probably put in the post that I was using the Lab Rat’s optimized scenario, rather than the initial scenario.

      As Nick pointed out below, in the optimized scenario, the Lab Rat maxes out his 401(k), IRA, and HSA so that brings him down into the 15% tax bracket.

  2. jlcollinsnh
    October 28, 2013 at 3:04 pm

    Very interesting, but since you used VTSAX in your scenario, a word of caution.

    When using Vanguard funds there is this glitch:

    “If you sell or exchange shares of a Vanguard fund, you will not be permitted to buy or exchange back into the same fund, in the same account, within 60 calendar days.” quoted from Vanguard.

    The easy way around this is to exchange from VTSAX to VFIAX (S&P 500 index fund) and back to VTSAX after 60 days. While VTSAX slightly out performs VFIAX over time, for short periods either could win making this an non-issue. In fact, I’d be comfortable enough with VFIAX to say just leave the funds there until you are ready to harvest the profits again.

    • The Mad Fientist
      October 28, 2013 at 8:25 pm

      You’re absolutely right, Jim!

      When I wrote the initial Tax-Loss Harvesting article, I debated whether to invest the Lab Rat’s money in Vanguard mutual funds or Vanguard ETFs but since I wanted to make my calculations easier, I went with the mutual funds (because as you know, you can buy fractional shares of mutual funds so that made the math less complicated, since I didn’t have to worry about some of the money not getting invested every month).

      I didn’t run into any frequent trading restrictions when harvesting the tax losses, because I was staying out of the funds anyway to avoid wash sales, but for tax gain harvesting, it’s a different story. Since you can immediately repurchase the asset you just sold (after selling them for a gain), the Lab Rat would have been better investing in Vanguard ETFs so that he could simply repurchase the same exact funds after tax-gain harvesting.

    • Trevor
      December 28, 2020 at 10:00 pm

      If you sold the vtsax and bought the vfiax after the 60 days and exchange it back to the vtsax wouldn’t that be a short sale

  3. Nick
    October 28, 2013 at 3:53 pm

    Mad Fientist, thanks for your kind words! Another awesome post! Two other keys to this strategy are using specific identification for your share lot purchases and not mixing LTCG’s with losses in the same year (especially when LTCG’s are taxed at 0%!). The Rat will be able to take his $3,000 loss against income for 7 years then probably go back to harvesting more gains in the future given the fund’s performance 2009-2013.

    P.S. @Justin – I believe the Rat was also contributing $3,250 to a HSA and would be able to take a personal exemption of $3,900. This will lower his taxable income to $23,750 and allow the Rat room to harvest gains each year (up to $12,500 each year).

    P.S.S. @jlcollinsnh – Good call on the 60 days! Whether lucky or good, Mad Fientist did assume that the Rat reinvests after two months from VLCAX to VTSAX :)

    • Justin
      October 28, 2013 at 6:43 pm

      Yeah, I re-read the HSA article shortly after posting that. Just wish I qualified for an HSA as well!

      • The Mad Fientist
        October 28, 2013 at 9:20 pm

        That’s definitely a bummer, Justin. I actually just selected my 2014 health insurance plan today and luckily, there was an HSA-eligible plan available. I’m not sure how much longer that will be the case but I’m glad I at least get another year!

        By the way, how have you been enjoying Personal Capital so far? The novelty has worn off a bit for me but I’m still enjoying it and I still use it more often than I use Mint.

    • The Mad Fientist
      October 28, 2013 at 8:47 pm

      Nick, great points, as always!

      Specific identification is easy to set up with Vanguard so it’s definitely worth doing so that you can easily choose which specific shares to sell in order to really maximize your tax savings.

      Also, making sure you don’t harvest gains in the same year you harvest losses (thus, canceling out some of your losses that could have been used to lower your higher-rate income tax) is a great point so thanks a lot for mentioning it.

      In order to keep things simple, I decided not to discuss the tax-gain harvesting that would have taken place between 2009 and 2013 but you’re absolutely right, he would have gone back to harvesting those gains after the big crash in ’08 and would now have a nice, high cost basis again!

  4. Jeremy @ Go Curry Cracker!
    October 28, 2013 at 7:42 pm

    Thanks for the mention, Mad Fientist. We are really excited to be able to take advantage of all of the tax avoidance options you’ve been sharing on your blog

    Between an HSA, a ROTH Conversion, and Capital Loss & Capital Gain harvesting, there really is no need for an early retiree to pay tax. It is nice when even the little guys are able to benefit from the tax code

    • The Mad Fientist
      October 28, 2013 at 9:54 pm

      My pleasure, Jeremy. I really enjoyed your article so I’m sure others will as well.

      You’re absolutely right that the tax code is kind to early retirees so I’m looking forward to taking full advantage of it soon.

      Thanks for mentioning me in your excellent post and please keep the articles coming!

    • Art @ Flexcents.com
      July 3, 2022 at 9:08 am

      This is exactly what I’m doing for my mom. We’ll slowly be converting money from her TSP to a Rollover ROTH IRA since her pension + social security is enough for her to live on and will avoid RMDs by the time she’s 72. Because she will likely stay in the 0% long-term capital gains tax bracket, whatever we’re not able to convert by that time, we’ll put in a taxable brokerage account.

  5. Justin K
    October 28, 2013 at 9:51 pm

    I am in the 15% tax bracket so my long-term capital gains and qualified dividends is 0%… selling any of my gains will not change my bracket so you shouldn’t consider that when taking a look at my situation..

    I already have realized capital losses of around $2,500 this year. I have around $500 of LONG TERM UNREALIZED capital gains. Should I sell and rebuy them to use this tax gain harvest or just wait until 2014?

    • The Mad Fientist
      October 28, 2013 at 10:16 pm

      Hey Justin, I would wait until 2014 to realize those gains. Here’s why…

      You currently have $2,500 worth of losses that you can use to reduce your taxable income. Assuming all $2,500 would be taxed at your marginal rate of 15%, you’ll save $375 on your 2013 taxes.

      If you decided to realize $500 worth of long term capital gains that you currently have, those gains would cancel out $500 worth of your losses so you’d be left with $2000 worth of losses (you’d be effectively paying 15% to avoid paying 0% on that $500). That means, you’d only reduce your 2013 taxes by $300 instead of $375.

      If, however, you wait until 2014 to harvest those gains, you’ll get to reduce your 2013 taxes by the full $375 and you will still pay $0 to increase your cost basis (assuming you remain in the 15% tax bracket).

      Does that make sense?

      • Justin k.
        October 29, 2013 at 12:57 am

        Yes! Very much so. Thank you!

        Make some more podcasts!!! They are great!

        • The Mad Fientist
          October 29, 2013 at 3:01 pm

          Haha, I was just saying to my wife last night that I need to get back on the ball and start putting out some more podcast episodes. Luckily, I’ve been speaking to a lot of really interesting people lately who are either FI or really close to it so I have no shortage of interesting guests to invite on…I just need to get around to doing it!

          Thanks for the additional motivation!

  6. Justin @ Root of Good
    October 28, 2013 at 11:05 pm

    Excellent explanation of “Tax Gain Harvesting”. I do this in my kids UTMA accounts on a small scale basis.

    We might tax gain harvest when my wife retires and our income drops substantially. Perhaps convert a little Trad IRA to Roth, and fill up some of the 15% bracket with 0% LT CG’s (while maximizing the Obamacare subsidy around 100/133% FPL depending on what our state does each year with respect to Medicaid extension).

    • The Mad Fientist
      October 29, 2013 at 2:53 pm

      Yeah, I am also waiting until our income drops before I do any tax-gain harvesting myself but I’m looking forward to the day when I have the option (although, I’ll have quite a bit of money in my Traditional IRA to get over to my Roth so that will likely be how I fill up my 15% bracket in the years immediately after FI).

  7. Debbie M
    October 31, 2013 at 5:13 pm

    Thank-you Mad Fientist (and Nick). This is awesome and I’d never heard of it or thought of it before.

    • The Mad Fientist
      October 31, 2013 at 7:51 pm

      You’re welcome! Glad you enjoyed the article.

  8. Benjamin Thomas
    January 14, 2014 at 12:39 pm

    Unless I’m misunderstanding something, one thing to keep in mind about this is that the 0% tax on long-term capital gains is the federal tax. Most states still charge an additional long-term capital gain tax. So you won’t necessarily be able to do this without paying any taxes on the sale.

    • The Mad Fientist
      January 15, 2014 at 9:00 am

      Hey Ben, you are correct. I should have stated that this article focuses on federal taxes only.

      • Benjamin Thomas
        January 15, 2014 at 10:32 am

        Dang! I was hoping I was misunderstanding something!

        • The Mad Fientist
          January 15, 2014 at 11:44 am

          It looks like you’re going to have to move to another state :)

          • Robert
            January 20, 2014 at 2:00 pm

            Come to Texas! LOL

      • Blake
        March 2, 2019 at 7:43 pm

        Perhaps it’s worth updating the post to state this, since many states recognize LTCG as ordinary income. I didn’t realize this after reading the article, and CT just wacked me with an extra $800 in taxes for $6k in gains (tax would have been $400 otherwise).

        • Arjun
          January 14, 2020 at 3:45 pm

          This is exactly why I decided not to Tax Gain Harvest last year. I was super excited to do it when I early-retired ever since I read this article. When I finally ran the numbers for my situation, it wasn’t worth it.

          Sure, Tax Gain Harvesting may have increased my portfolio value some, even after state taxes and other admin fees, and the real benefit is to better position myself for Tax Loss Harvesting. But as my portfolio grows and I invest regularly, I should naturally find shares that can be sold at a loss.

  9. frank
    February 1, 2014 at 10:29 pm

    Great article BUT…:)

    If you hold stock for (60 days in the 181 days before the ex dividend date) then the dividends will be qualified and thus taxed at 0% if you are in the 15% tax bracket. If however you sell and rebuy the stock I think at best you are not going to be able to get a qualified dividend for 2 quarters.. thus half of your dividend will become “ordinary” and thus taxed as income.

    Make sense?

    Frank

    • The Mad Fientist
      February 2, 2014 at 6:05 pm

      Hey Frank, according to the IRS, the holding period rule for qualified dividends states: “You must have held the stock for more than 60 days during the 121-day period that begins 60 days before the ex-dividend date.”

      It doesn’t say that the 60 days must be contiguous or that selling an investment resets the 60-day clock. You just have to own the stock for a total of 60+ days during the period.

      In the article, I suggested selling and then immediately repurchasing the asset to harvest your gains so that shouldn’t affect your ability to hold the stock for more than 60 days during the 121-day period.

      • Eli
        January 12, 2016 at 8:42 am

        Hello,
        I reached you through MMM–>JLCollins–>MadFientist and I love the dynamic you bring to the table with the tax optimization.
        For tax-gain harvesting, I was wondering if this might be a strategy to avoid both the 60-day limit on Vanguard mutual fund trading, the divided holding period issues, and the “staying in the market, and not on the sidelines” issue:
        Say someone has $6000 of VTSAX that consists of $5000 cost basis plus $1000 long-term capital gains they want to harvest. They also have a regular average $6000 balance in their checking account for next month’s expenses plus some extra emergency buffer.
        What if they buy $6000 of additional VTSAX on Day 1 and then on Day 3 or 4 (after the transaction has been fully processed), sell those previous shares that had appreciated. Of course no additional investments could occur in VTSAX for 60 more days, but the person wouldn’t be sitting on the sidelines for any length of time. Also, their checking account would be replenished in a few days, so unless a lot of bills were due on Day 5 or 6 it shouldn’t cause any cash flow issues.

        ….maybe a solution? or maybe I’m missing something…

        • jcw3rd
          February 6, 2016 at 12:30 pm

          Boy, that sounds like such a clever approach to both those potential issues (Vanguard re-buy limit and 60 day holding issue). I’m disappointed that no one bothered to respond to your suggestion. It sounds like such a simple solution (assuming that you have the extra cash available to do the early purchase), but I worry that there is some unknown gotcha to this approach.

          Anyone have anything to contribute to this suggestion? I love it!

          • tbfa
            December 24, 2016 at 9:56 am

            I think this would work great as long as you have the cash. It would probably not make sense for larger portfolios if someone is near FIRE. You would not have tens or hundreds of thousands sitting in cash waiting for this.

            I like your idea because you would not be locked into a second choice investment for 1 year (to dodge STCG taxes). I harvested some capital gains from VTSAX into VFIAX. I’d like to exchange the VFIAX back into VTSAX in 60 days, but will wait and see what kind of gains or losses that will be.

          • cb
            December 25, 2016 at 5:35 pm

            Actually, there is a much easier way to get around Vanguard’s frequent trading policy. You can buy back into the same fund within 60 days if you do a mail order or by setting up an automatic purchase. You can set up an automatic purchase to be monthly, starting on the day that you want to buy, and having the through date be the next day (essentially making it a one-time purchase). I’ve done this successfully several times over the years. With Vanguard, after I sell, I usually have the money in my bank account 2 business days later. Once the money is in my account, I set up the one-time automatic purchase and it’s a done deal. No need to buy a different fund, no need to wait 60 days. If you don’t have the extra cash sitting around to invest immediately, you’ll still only miss out on 2 days of market activity.

            Thank the wonderful people over at bogleheads.org for the info:
            https://www.bogleheads.org/wiki/Frequent_trading_policy

  10. Gregg
    February 27, 2014 at 8:31 pm

    One thing you didn’t mention is donating appreciated securities (a web search for this term will reveal the details). If you donate to a registered charity and can’t normally get a 0% capital gains rate, donate some shares (ideally those with the largest capital gain) instead of donating cash–you’ll get a 0% CG rate and the full value of the donation will still be deductible. This works in the US and Canada.

    • The Mad Fientist
      February 28, 2014 at 9:13 pm

      Great point, Gregg.

      Speaking of donating shares that have appreciated, another good strategy for avoiding capital gains taxes is to give your kids shares that have appreciated. For example, if you have kids in college and you give them each $10k per year for expenses, you’re better off giving them $10k worth of shares (the ones that have appreciated the most) instead of cash. Your kids would then sell the shares and use that to pay for their college expenses. Since they will likely have little to no income as students, they will likely have a 0% capital gains tax rate, which is probably much lower than yours if you are still working.

      • Josh
        December 11, 2024 at 1:49 pm

        I first read this years ago, finally getting around to putting it into practice…

        There seems to be a big wrinkle with giving shares to the kids for college: Gains over $2,600 (in 2024) are subject to the kiddie tax, meaning they are taxed as ordinary income at the parents’ marginal rate. So in trying to avoid the 15% LTCG, you can end up instead paying 24% or 32% or worse.

        This applies if the kid is an unmarried full time student under 24 who can be claimed as a dependent; ie your standard college kid. Kiddie tax rules have changed at least twice since this was first published, so anyone reading now take note.

  11. Adam
    July 17, 2014 at 7:47 pm

    So what about for someone who is in a much higher tax bracket, such as 33%? Then it probably doesn’t make sense to do tax-gain harvesting, correct?

    • The Mad Fientist
      July 20, 2014 at 10:17 am

      Correct. You definitely don’t want to create a taxable event if you’re currently in a high tax bracket.

      • Ming
        March 17, 2015 at 2:09 am

        Why wouldn’t this apply for high tax bracket folks? The tax rate for long term gain is fixed at 15%, right? So it doesn’t matter if you take the gain now or later. Yes you can avoid this tax later when the income drops into 15% bracket, but combining this with tax loss harvesting, we can trade the amount of gains that are taxed at 15% rate to cancel the same amount that will be taxed at 33% or higher, saving 16% tax, right? Am I missing anything here?

  12. Jenifer Lapinski
    July 23, 2014 at 2:09 am

    Hello. I pay 0% for my long term capital gains. I’ve read that if you tax gain harvest that you shouldn’t tax loss harvest. They say you should defer losses to the future when tax rates will be higher or when you’re in a higher tax bracket. If there’s a year when all my holdings go down and I can’t tax gain harvest, should I still not do tax loss harvest? Thanks.

    • The Mad Fientist
      July 24, 2014 at 8:00 am

      Hi Jenifer,

      Yeah, you shouldn’t do both in the same year so you could tax-gain harvest now and then harvest bigger losses down the line when you have them.

      Tax-loss harvesting can reduce your ordinary income taxes so even though you pay 0% in long-term capital gains, you could still tax-loss harvest in years your investments go down in order to reduce your taxable income.

  13. Jimmy
    September 20, 2014 at 12:16 pm

    I’m a little bit confused about this strategy. For example you buy the ETF at price $50 and after one year it become $60. If you sell it, you’ll gain $10 profit but if you buy it again at price $60, doesn’t it mean you’re break even since you sell at $60 and buy it again at $60? Thanks for the clarifications

    • The Mad Fientist
      September 23, 2014 at 1:46 pm

      If you buy it at $50 and then sell it for $60, you make a $10 profit, which you have to pay tax on (if you have a 0% long-term capital gains tax rate, you pay $0 in tax). If you re-buy the same investment immediately, your new cost basis is $60. Now, if the ETF drops back down to $50, you can harvest a $10 loss, which you can use to lower your taxable income or offset other capital gains.

      Tax-gain harvesting is just a way to increase your cost basis when it is free (or cheap) to do so in order to harvest more losses or lower your capital gains in the future.

  14. John L
    March 20, 2015 at 1:47 am

    Hi. Thank you for sharing your blog. I’m in the process of early retirement as well and your blog has been extremely helpful. My question is, if I had a certain stock that made $100,000 profit after holding on to it for more than a year, does the $100,000 ruin my ability to remain in my current 15% tax bracket and therefore no longer be eligible to pay 0% Fed taxes? In other words, do capital gains go towards the income level which effect my tax bracket?

    If this is the case, do you have any other recommendation to lower the tax burden if I need to sell for a large profit (assume that holding onto this particular stock for the long term has more risk involved and should not be in my portfolio in 1-3 years from now)?

    After reading JL Collin’s and your blog, I decided to invest in Vanguard Index funds. Thank you!

  15. Todd
    October 26, 2015 at 9:53 pm

    Don’t forget about state taxes!

  16. Sophie
    March 21, 2016 at 10:53 pm

    Great article, I am learning so much from your posts! Thank you! I have a question, I purchased $100,000 (10,000 shares at $10) in stock of a closely held company back in 2006, and now it is worth $350,000. My income is moving from the 25% bracket to the 15% bracket next year, and I would like to harvest some gains during that year. Can I sell a portion of these shares, say 2,500 shares to harvest a gain of $62,500, or must the entire initial investment be sold? Thank you in advance for your response!

    • jcw3rd
      March 22, 2016 at 11:40 am

      Yep, you can sell any portion of that lot at any time and receive long-term-capital-gains treatment on that sale (as long as you’ve held it for longer than 1 year).

  17. Kris
    August 8, 2016 at 2:23 pm

    Keen idea! I’m new to this deeper understanding of taxes, so please excuse my ignorance. Two questions:
    1. When selling shares from a fund, are the long-term holdings automatically sold first and then the short-term only when the long-term run out?
    2. Let’s say one’s ordinary income is $60,300, putting her in the 15% marginal tax rate. If she sold shares in a stock fund with $20,000 capitol gains. Wouldn’t that mean the first $13,000 would be 0% taxed, but the remaining $7000 would be subject to a 15% tax?
    Thanks for any clarity you may have!

  18. burl lagrone
    October 9, 2016 at 10:39 pm

    Thoughtful analysis ! Apropos , if someone has been searching for a IRS 1040 Line 44 , my business encountered a template form here https://goo.gl/R6rJY5

  19. mike B
    January 13, 2017 at 10:22 pm

    hi, i am interested in helping my sister with her finances. She was disabled in an accident and is receiving ssdi at about 20k per yr as well as another 10k of ltd which is partially taxed. so together about 30k. She had investments which add about 10 k per year between div’s and interest. As i know my self seems the markets are more unstable than past and she needs to rely on this income for future as she is only 47. most of her investments are in vanguard and i am helping to manage her accts but am not a planner by no means. I am just using some of their most popular index funds as well as some etf’s. based on the income from ss I am not sure how that is perceived by the irs. do they tax the full amt or what? the ltd is partially taxed because she paid for part of that with after tax dollars. she no longer has the ability to use hsa’s or 401k contributions to offset income but her income is much less due to being on ss. Any strategies you could share to help limit taxes. I want her to harvest some gains before markets drop off or correct again so she can get a little ahead. thanks

  20. Bodio
    March 14, 2017 at 6:37 pm

    “Based on the Lab Rat’s adjusted gross income, he is in the 15% marginal tax bracket.”

    Isn’t the marginal tax bracket calculated based on your “taxable income” and not AGI?

  21. Ken
    April 18, 2017 at 1:31 pm

    You can carry forward tax losses into the next 7 years?

    BTW, is there a way to subscribe to replies so I can come back to the site when someone replies? If not please consider it, because there’s no way I’ll ever remember to check all the blog posts I’ve posted on across the web. Plus it drives returning visits to your site ;)

    There are plenty of free WordPress plugins. I like Disqus, but there are plenty of others that don’t require each user to create a free account.

  22. Matt
    May 12, 2017 at 8:24 am

    This is probably a really dumb question but I’ll ask anyways. This tax gain harvesting strategy is for taxable accounts only, right? Why do so many people have money in taxable accounts? Is this because you’ve maxed out the 401K, HSA, IRA, etc. and still have money to invest? If I’m saving money in my 401K, 457b, pension (required), and HSA only…then this doesn’t apply to me?

    Thanks!

    • Carrie
      April 20, 2019 at 2:25 am

      I have the same question. Too bad you didn’t get a response.

    • Dave
      November 18, 2019 at 1:25 am

      Yes, tax gain/loss harvesting only applies to taxable accounts.

      As you mentioned, those who have maximized their tax deferred savings for the year would put any additional savings into taxable accounts. It is also possible that someone nearing an early retirement may want to build up some taxable account money to live off before turning 59.5 when the tax deferred accounts become accessible without penalty. Even if employing a Roth ladder, you need to have 5 years worth of expenses in taxable accounts.

  23. Mighty Investor
    September 17, 2017 at 1:16 pm

    This was a fascinating article. I hadn’t thought about tax gain harvesting, I have to confess. Does anyone have thoughts on whether it makes more sense to prioritize converting Traditional IRAs to Roths until you hit the bump up from 15% tax bracket to 25% vs. prioritizing tax gain harvesting? I’m thinking harvesting tax gains should take priority because locking in the higher basis could prove fleeting–while converting to a Roth is always an option. But I welcome your thoughts!

  24. Brandon g
    October 8, 2017 at 4:12 pm

    Old post but quick comment. For higher income earners, say in 25% marginal bracket, capital gains is 15% instead of 0. Still tho, for the mentioned strategy above that will effectively tax at 15% up front when realized for capital gains, and then save 25% marginal later when realizing losses. Still a 10% savings rather than 15% savings per your post. However, the big difference is the opportunity cost of investing that upfront 15% vs the 10% saved later with realized losses. With your situation, since capital is 0%, there is NO lost opportunity cost. I’d b curious on your thoughts on how this changes the math, and if it is still worth gains harvesting. Thanks in advance!

  25. Mike
    October 9, 2017 at 10:53 am

    I’m still confused about the cost basis. If you’re constantly putting money into an investment account, the cost basis will likely be different each time you invest. When trying to harvest gains/losses, how do you know which investment the taxes will be applied to?

  26. Chris
    April 13, 2018 at 12:24 pm

    What about dividends? If we raise our cost basis we are also reducing the number of dividend paying shares that we own. Seems like this would be a losing game to save a little on taxes. I haven’t run the numbers though.

    • Joe
      October 1, 2018 at 3:41 pm

      Wouldn’t you have the same number of shares? Let’s say you own 100 shares of XYZ corp. You bought them at $5 a share, now they are worth $10 a share. You sell all 100 shares for $1,000. You immediately buy back 100 shares for $1,000. You still own 100 shares, but your cost basis is now $10 instead of $5.

      Great question though. I had to think about it for a while.

  27. Anthony
    June 26, 2018 at 6:27 pm

    Does it make sense to increase my basis yearly within my IRA account until I retire? I am 30 and am probably 20 years out to retirement. You cant realize any capital gains or losses until you move the money outside of IRA’s correct?

    • Daniel
      October 2, 2018 at 10:46 am

      No. You don’t have “basis” within an IRA. You have a total pot of money. Whenever you withdrawn it, it will count as income. Tax-gain and Tax-loss harvesting are for your taxable accounts.

      disclaimer, not a tax professional

  28. Questionable Existence
    March 27, 2019 at 4:25 pm

    Do you harvest gains in a IRA account, just the same way?

  29. Nat
    April 2, 2019 at 11:55 pm

    There’s an important consideration for those who have retired early and are using the ACA until such time as they qualify for Medicare:

    I have 7 years before I qualify for Medicare and I’m on the ACA now. An important goal is to minimize health care premiums and that means aggressively constraining MAGI since it’s MAGI that counts for the ACA.

    Anything that creates “income” during the year counts for the MAGI calculation (minus adjustments), even if that income doesn’t otherwise count for the AGI. Tax gain harvesting would create capital gain income from selling in the current year, which would get added to the MAGI total. Even the dividends from my muni bond fund, which is tax free for Federal taxes, gets added back in for the MAGI calculation. I already have a yearly $3K carryforward cap gains loss that I’ll sadly never use up in my lifetime, so I don’t need to generate even more cap gain losses to carryover.

    In addition, I’m trying to convert whatever IRA monies to Roth I can each year while still staying at the MAGI number I’ve set for the year. That conversion amount depends on the amount of total divs, cap gains, interest, and other income recognized. I track all of this closely in a spreadsheet so I can see each month my totals for each type of income. Any conversion from IRA to Roth thus has to wait until the end of December.

    All of this is to say…things can get complicated when you factor something like the ACA into the mix. While it’s not impossible for folks to use a tax gain harvest strategy in combination with dealing with income limits on the ACA, it has to be carefully calculated in light of all other sources of income.

  30. Chris
    May 19, 2019 at 8:01 pm

    This may have already been asked but what happens to capital gains if you get bumped to the next tax bracket?

    Are capital gains taxed progressively? More specifically, are the LT capital gains below the 0% tax bracket taxed at 0% and anything over gets taxed at the next tax bracket?

  31. Kristy
    September 10, 2020 at 8:51 pm

    Great post! The idea of selling assets to realize gains in order to increase basis had occurred to me before I knew there was a name for it, and I kept googling various phrases like “realize gains to increase cost basis” to see if this was an existing strategy that people had written about, but none of the google search results turned up anything relevant. I thought maybe I was crazy for thinking this idea would work if I couldn’t find anything on the internet about it, until I finally stumbled upon this blog post and found out there’s actually a recognized name for this.

    I’m a few years away from early retirement, so I’m really looking forward to using these various strategies like tax gains harvesting and Roth conversion ladders (I’m hoping to write my own robo-advisors with the Fidelity APIs if there aren’t existing robo-advisors designed to optimize for early retirees).

    However, a drawback with tax gains harvesting that occurred to me: I see some comments here that mention state taxes, but no one has mentioned itemized deductions (and perhaps other tax credits) that are impacted by AGI. Capital gains are still included in AGI, so if you have itemized deductions that depend on AGI, tax gains harvesting can cause indirect taxes on those gains by reducing the amount of deduction you qualify for. I imagine many early retirees are able to take the medical itemized deduction, since their AGIs are low and they have high out-of-pocket costs for non-employer-sponsored insurance premiums and health deductibles (unless they pay with their HSAs, but I imagine the type of people interested in these tax strategies would also be saving their HSAs to take advantage of tax-free growth).

    For example, if I harvest $10,000 in gains to take advantage of the 0% capital gains rate, my AGI is increased by $10,000, so my eligible medical deduction amount is lowered by $1000 (in 2020, only medical costs above 10% of AGI can be deducted). Now $1000 of my ordinary income that would’ve been tax-free will now be taxed at 10% or 12% (depending on my tax bracket). Even if I didn’t have any taxable ordinary income above my total deductions, that’s $1000 less that I can use towards my Roth conversion ladder (and if I go ahead and convert that $1000 anyway it would now result in a 10% tax). So this $10,000 tax gain harvest would result in $100 or $120 in taxes, so it essentially has an effective 1% or 1.2% tax rate. It’s a low tax rate, so depending on the person’s situation, it most likely is still worth it, but just be aware that even if your capital gains rate is 0%, it’s not a totally free lunch.

    Unless I’m missing something here? I haven’t personally experienced this yet because I haven’t tried tax gains harvesting yet, so this is purely theoretical for me right now.

  32. Brad H.
    January 2, 2021 at 9:46 am

    If I have, after deductions, 32K taxable income and I plan to harvest 10K in STCG and 10K in LTCG, how is this money taxed? Does the LTCG get applied at the 0% rate first up to 40K and the balance of 2K LTCG taxed at 15% for being over 40K? and then taxed at the regular income tax rate for the 10K of STCG?

  33. Scott
    September 26, 2022 at 1:55 pm

    I’ve used this strategy to donate in-kind donations to my church from my Brokerage account and then immediately purchase back those shares at the now higher cost basis. Does this seem like a reasonable course of action? I know the gains are minimal, but it’s a small strategy I can take advantage of.

Leave a Reply

Your email address will not be published. Required fields are marked *