Let’s take Joe, a hypothetical investor, who thinks he is really good at trading. In the past year, he has been fiddling with his portfolio on a quarterly basis, buying low, selling high, usually after reading something online. And he’s doing well—the market is up, so he is making money.

Then let’s take another investor, who strives to be like The Dude in The Big Lebowski. He dumped some money into his investments in January and has since ignored them. And knowing him, he won’t do a thing with it for at least another decade.

Who’s the better investor? Year over year, after all is said and done, it’s likely The Dude.

You can probably guess that this is not really a story about personality types—but about the invisible cost of active trading. When you market time, no matter how well you do, you’re going to get stung on taxes. If you’re moving between securities quickly, chances are, you never hold them for longer than a year, so even if you’re successful (a big if!), you will owe short-term capital gains tax on your gains. This one is a killer—siphoning up to nearly 45% of your returns to Uncle Sam, when including state tax.

Outperforming an index is hard, and doing it year after year is even harder, but that’s not enough. You actually need to substantially outperform the index to wind up with better returns, because the tax code is set up to discourage speculative trading. To observe this effect, you need to focus on after-tax returns.

A Quick Review on Tax Rates

You incur taxes on short-term capital gains when you sell an appreciated security that you’ve held for a year or less. Any longer, and the gain will be long-term. The federal tax rate on long-term capital gains goes up to as much as 23.8%, while short-term capital gains get taxed up to 43.4%. When you pay the short-term rate, instead of waiting for the long-term rate, you effectively reduce your own investor rate of return.

The $100,000 Case Study

To get a sense of how taxes from active trading can drag down a portfolio’s returns, we backtested the performance of two $100,000 investments, from Jan. 1, 2000, to Oct. 31, 2014. Both initially started with a Betterment portfolio allocated to 50% stocks.

Portfolio A remained passive for the term, maintaining the target 50% stock allocation. Automated rebalancing kicked in any time the allocation drift exceeded 5%. After 14 years, the portfolio was worth $282,000 upon full withdrawal, after all taxes.

Portfolio B began at 50% stocks, but every quarter it rebalanced to a different (random) stock allocation. This means that every time the allocation was reduced, stocks were sold. This simulation mimics investors who attempt to anticipate market movements, or chase trends. The portfolio was worth $240,000 upon full withdrawal, after all taxes.

How to explain the difference? Even though the average stock allocation of Portfolio B was 50%, constantly altering the allocation will, of course, result in different exposures over the period, making meaningful comparisons difficult.

But there is one distinction which had to have a massive effect: not including the ultimate liquidation, Portfolio B paid nearly $30,000 in short-term capital gains taxes over the period—on average more than $2,100 per year. Meanwhile Portfolio A paid about $3 in short-term capital gains tax, as part of a rebalance in 2000, and never after that (subsequent to Year 1, long-term lots were always available when rebalancing kicked in.)

The Hidden Taxes in Actively Managed Funds

This effect can be particularly costly inside mutual funds, which can obfuscate their tax-inefficiency by parading their pre-tax returns. Meanwhile, the after-tax adjustment can be dramatic. Inside every actively managed fund is a professional Joe—making stock picks, and realizing short-term gains on your behalf.

You have to dig a little to appreciate the capital gains problem inside an actively managed mutual fund. All funds are obligated to distribute any realized capital gains to its investors at the end of the year.

Here is a list of mutual funds that are expected to distribute lots of such gains this year. At the top of the list is Eaton Vance Large-Cap Value. Let’s look at its performance compared to the large-cap value index fund VTV, that we use in the Betterment portfolio:

eatonvance

Taking a look at the chart, they’re both up about the same, year-to-date, and seem to track very closely. So no difference, right?

But when it comes to investing, you should care about your investor returns—not the fund’s returns. Let’s look at more detailed info at Morningstar for both.

    • Eaton’s Pre-Tax YTD return: 9.48%. After-tax: 2.76%
    • VTV’s Pre-Tax YTD return: 10.16%. After-tax 9.36%
    • Eaton’s capital gains exposure is 3x that of VTV.
    • In investor take-home returns, that is ~6.5% negative alpha.
    • That stinks.

The Bottom Line

Unless you plan to never liquidate your assets, taxes on gains are inevitable, and you should not have an irrational aversion to them. But you should have healthy aversion to the most costly of them—the short-term capital gains tax. In all but a few rare situations, you can and should avoid it.

Our newest tool, Tax Impact Preview, shows you the amount and type of capital gains you about to incur, before you commit to a trade. Surfacing the hidden cost of active trading in this way makes you think twice about impulsive decisions, and encourages you to stick to your long-term plan.

It’s no accident that a Fidelity study actually found that investors who forgot they had accounts did bestThis is one of the beauties of being a buy-and-hold investor—you do less, and as a reward, you also hand over less of your money to the government.

So, in other words, it pays off to be a slacker sometimes, dude.

This article originally appeared on Forbes.com.

More from Betterment:

Betterment is the largest, fastest-growing automated investing service, helping people to better manage, protect, and grow their wealth through smarter technology. The service offers a globally diversified portfolio of ETFs, designed to help provide you with the best possible expected returns for retirement planning, building wealth, and other savings goals. Betterment is a CNBC Disruptor 50 and Webby award winner and has been featured in the New York Times, Forbes, and the Wall Street Journal. Betterment helps people to achieve a smarter financial future with minimal effort and at a fraction of the cost of traditional financial services. Learn more here.