The average fund gained about 7.7% per year over the 10 years ended December 31, 2022, while the average dollar invested in mutual and exchange-traded funds earned a 6% annual return. That 1.7% gap turns into 17% over 10 years—and it’s the result of the timing of investors’ purchases and sales, according to Morningstar’s annual “Mind the Gap” study, released in late July. The study finds investors struggled to time cash flows into and out of their investments, which cost them.

As a result of when investors bought and sold their funds, “investors missed out on about one-fifth of their fund investments’ average net returns, a significant shortfall,” wrote the study’s author, Jeffrey Ptak, chief ratings officer for Morningstar Research Services LLC.

The study compares the average investor’s return on investments in funds and exchange-traded funds and compares it with the average fund’s actual total return, attributing any difference to the timing of when investors bought or sold shares.

“The smaller the gap, the more investors captured their funds’ total returns and vice versa,” Ptak wrote.

That 17% gap “is more or less in line with what we’ve found when estimating the dollar-weighted return gap for the 10-year periods ended December 2021 (-1.7% gap), 2020 (-1.7%), 2019 (-1.5%) and 2018 (-1.6%), suggesting that timing costs are a persistent drag on the returns investors earn,” he added.

When grouped by asset class, the only class in which investors outperformed the actual fund performance was in allocation funds, which Morningstar defines as equity funds that seek to provide both income and capital appreciation by investing in multiple asset classes including stocks, bonds and cash.

The average dollar invested in allocation funds gained 6% per year over a 10-year period ended December 2022, while there was a 6.4% return for the average fund, a gap of 0.46%—the narrowest gap of any asset class.

On the flip side, investors in narrower sector equity funds earned only 6.4% per year on their dollar, which was 4.4 points less than the average fund’s 10.8% total return—“a large deficit reflecting mistimed flows,” Ptak wrote.

The average dollar invested in U.S. stock funds earned 11% per year over the decade ended December 2022.

Still, that means that the average dollar invested in U.S. stock funds lagged the return of the average fund by around 0.8% per year over the 10 years ended December 2022.

The gap grew when investors selected alternative funds, where the average dollar lost almost 1% per year while the average fund rose about 1% per year.

Morningstar also estimated the dollar-weighted returns of the 10 largest Morningstar categories by net assets over a 10-year period.

The average dollar invested in the most popular U.S. stock categories earned almost as much as the average fund, as evidenced by the relatively small gap for the large-cap blend category (a mix of value and growth). In contrast, investors actually beat out the market in the large-cap growth category. Investors trailed the large-cap blend return by just 0.59% and actually beat out the large-cap growth performance by 0.10%, Ptak found.

Similarly, the average dollar-weighted return of moderate-allocation funds nearly matched the average fund’s total return, falling behind in performance by only 0.29%, Morningstar found.

Investors found it most difficult to effectively time their way into and out of more volatile funds.

“One of the clearer takeaways from the study is that investors are more likely to mistime their investments in highly volatile funds than they are in less-volatile funds,” Ptak wrote.

On average, the least volatile funds’ dollar-weighted returns lagged their total returns by around 0.9% per year, which was a full percentage point narrower than the gap for the most-volatile funds.

But the gap for riskier funds, such as alternative funds ranked in the highest volatility quintile by Morningstar, saw a significant gap of negative 15.8%, Morningstar reported.

How can investors keep more of their gains? One way is to use allocation funds, which “also help mitigate the risk of mental-accounting mistakes that investors are prone to, such as buying more of a high-performing stand-alone strategy and selling a lagging one when they should be doing the opposite,” he adds.

Steering away from riskier funds also can save investors from performance gaps.

“Interestingly, we found larger gaps in areas and styles for which there is robust academic support, like tilting to value, smaller-company stocks, or emerging markets, suggesting that the added volatility these strategies entail cost investors any excess return they might have earned and then some,” Ptak concluded.