No matter how much you earn, you'd probably rather pay the IRS less money than more. And the good news? If you play your cards right, you can lower your tax burden for 2021 and set yourself up for a solid 2022. Here are some essential tax moves to make before the current years winds down.

1. Unload losing investments

Your goal in buying stocks should be to make money. But sometimes, otherwise solid companies can see their finances take a turn for the worse.

It's one thing to own shares of a company that's simply having a bad year. But if you have a stock in your portfolio that's just been losing money year after year, and that has been underperforming compared to the broad market, then it may be time to unload it. And if you do so before the end of the year, it could work wonders for your 2021 tax bill.

Person at laptop.

Image source: Getty Images.

Any time you sell stocks at a loss, that loss can offset capital gains. And even if you haven't sold any stocks at a profit this year, you can still use a capital loss to offset up to $3,000 of ordinary income. As such, dumping a losing stock within the next month could work to your advantage.

2. Max out your 401(k) -- or get as close as you can

You have until next year's tax-filing deadline to sneak more money into your IRA. But if you're saving for retirement in a 401(k) plan, all 2021 contributions must be in your account by December 31. Since those contributions are taken as payroll deductions, now's the time to put in a request to have more of your paycheck allocated to your savings plan -- before you run out of time.

Of course, you may not be in a position to max out your 401(k). This year, savers under 50 can contribute up to $19,500, while those 50 and over can contribute up to $26,000. If you earn an average salary, those are tough thresholds to meet. But in that case, do your best to pump as much money into your 401(k) as you can. It'll serve as a nice tax break (assuming you're funding a traditional 401(k) and not a Roth) and also set you up with more money for the future.

3. Use up your FSA

If you put money into a flexible spending account, now's the time to start spending down your balance. Some plans do offer a grace period that allows you to use your balance in early 2022 or carry some of your funds forward into your next plan year. But that's not something you should count on, as not all plans offer it.

Instead, take a look at your balance and figure out how to best use it up. If you're sitting on $300, now may be a good time to renew a bunch of recurring prescriptions, get new contact lenses, or load up on over-the-counter medications that are FSA-eligible.

4. Ramp up your charitable giving

If you're planning to itemize on your 2021 tax return, then the more money you give to charity, the more savings you stand to reap. If you have the financial flexibility to give more money to charity in the coming weeks, it could work to your benefit to make those donations now rather than wait until the new year.

That said, it's not just monetary donations that can serve as a tax write-off. If you're clearing out your closets to prepare for an influx of holiday gifts, you can donate used goods to charity and claim them on your taxes, too. Just be sure to keep receipts and records of your donations.

Before we know it, 2021 will be over and the new year will kick off. Make these important tax moves while you can. They could result in a world of savings.