Congress is currently working on a massive overhaul to our tax code, and the Republican-led majority appears committed to signing a bill into law before the end of the year. While the proposals have far-reaching impact, one provision proposed by the Senate would be particularly punitive for retail investors: the so-called “first in first out” (FIFO) mandate.

This provision mandates that when retail investors sell a portion of an investment, they must sell their oldest shares first—that is, the first shares “in” must be the first shares “out.” While this technical change may sound innocuous, the FIFO mandate would dramatically harm millions of retail investors. It would raise taxes in unintuitive ways, distort investment behavior, and deprive investors of the opportunity to plan efficiently for retirement. Investing would become more complex and more time consuming—disempowering and disenfranchising everyday people who need to invest for their future.

(More: Senate tax bill survives budget committee, heads to floor vote.)

The Senate has already recognized that the FIFO mandate is bad news. In the first draft of the bill, the FIFO mandate applied to investments made by investment funds, but the Senate exempted them after an intense lobbying effort. As a result, investment companies will continue to have the freedom to decide which shares they want to sell. Retail investors deserve the same opportunity.

FIFO FUTURE

Imagine an investor who, for the last 20 years, has been putting $100 each month into an index fund that has returned 10% on average. After 20 years, her deposits from the first year are now up approximately 600%. Say the market has been down this year, but she continues her monthly investments, knowing that in the long term, consistency is the best strategy.

Now assume that, before the index fund has recovered its value, our investor has an unforeseen expense of $600. She covers it by withdrawing from her portfolio. Under current tax law, she would be able get the $600 she needs by selling the shares that she purchased earlier in the year. Since these shares are currently trading at less than what she paid for them, she wouldn’t owe any taxes because she actually lost money on those shares. In fact, she could use her losses on the shares to offset other income, reducing her overall tax burden.

In contrast, under the proposed FIFO mandate, she would not be able to sell her most recently purchased shares. Instead, she would be forced to first sell the shares that she purchased 20 years ago, which would mean that $500 of the appreciated value would be considered taxable gains. Assuming a combined federal/state long-term capital gains rate of 25%, she will owe $125 in taxes.

In trying to withdraw $600, she will be left with $475, net of the tax she owes. To get the full $600 out of her portfolio, she would have to sell about $760 worth of shares, despite the fact that she just put in $600 this year, and that her most recent investment has actually lost value! The FIFO mandate might cause her to attempt complex and burdensome strategies to avoid this harsh result. Or, more likely, she would simply decrease her investments in the market, impairing her own investment goals and the growth of the overall economy.

TRIPLE TAXATION

According to the GOP Tax Reform Framework released earlier this fall, tax reform seeks to establish a “simpler, fairer” tax code “built for growth.” The FIFO mandate will actually undermine these goals by distorting investing behavior as investors take extraordinary measures to avoid taxes or avoid investing altogether. Middle-class savers and retirees will fare the worst.

By depriving investors of the freedom to choose which shares they want to sell, the FIFO mandate effectively raises taxes on investment income, resulting in a new era of triple taxation for retail investors. Under current law, retail investors already pay personal taxes on investment returns, and the companies they invest in pay corporate taxes. By greatly increasing the impact of capital gains tax, which could otherwise be deferred (or possibly avoided) under current law, the FIFO mandate essentially imposes a third layer of taxation.

Under the FIFO mandate, investors would have to take extraordinary measures, divorced from economic reality, to avoid a large tax bill. Decisions made decades earlier could lead to potential tax consequences that would prevent investors from making what would otherwise be the best investment decisions. Investors would have to maniacally focus on the tax lots they purchase and sell. They may be encouraged to purchase countless versions of similar funds to preserve the ability to access their money in response to unplanned needs.

They could seek to open a multitude of accounts at different financial institutions to avoid the FIFO mandate. But, these complicated strategies are likely to be impractical for ordinary retail investors, many of whom already struggle to find the time to properly manage their finances. Only wealthy investors are likely to successfully avoid the FIFO mandate; other people are more likely to pay higher taxes—or worse, invest less.

Thus, the FIFO mandate will be particularly punitive precisely for middle class savers who have done everything right: picking an investment strategy and sticking to it consistently. They are the ones who would find themselves with fewer and more expensive options when they need to access their savings, including in the face of an unplanned emergency. This is plainly unfair.

Retirees would suffer disproportionately. In a world where corporate pension plans have largely disappeared and Social Security benefits are set to be increasingly uncertain (the Social Security Administration says it is “three quarters funded for the long term”), saving for retirement is already a challenge for most Americans. FIFO further complicates retirement savings because older investors will disproportionately face higher taxes early in retirement, as the first shares they will be required to sell will likely have the largest gains. In a future where retirees are personally responsible for their retirement, every penny matters and depleting retirement savings is counterproductive.

Furthermore, the many unanswered questions about the mandate could have major consequences for investors. For example, would the FIFO mandate apply across spouses, meaning there might be a marriage penalty? Would it apply across different brokerage accounts, leading to complex accounting or gaming by opening multiple accounts? Would the FIFO mandate apply to charitable giving? Depending on how these questions are answered, the FIFO mandate could inflict additional harm.

NOT HELPING

So, given all the consequences of a FIFO mandate, why is it in the Senate’s tax plan today? The probable answer is, the mandate’s potential to raise revenue—$2.7 billion over 10 years, according to the Joint Committee on Taxation. That $2.7 billion will come primarily from middle-class investors early in retirement.

Yet, the revenue generated from the FIFO mandate is minuscule compared to the Senate tax plan of $1.5 trillion in overall deficit spending. The FIFO mandate’s paltry revenue generation is hardly a solution to Congress’ larger budgetary problem. It would cause collateral harm and create unfairness that are not nearly justified by the additional revenue.

Jon Stein is the CEO and founder of Betterment.