These days, consumers are paying more for just about everything, from gas to groceries to apparel. And due to higher living costs, many people are more eager than ever to conserve cash and boost their savings.

That line of thinking makes sense. But if you're in a reasonably good place savings-wise (meaning you have a fully loaded emergency fund) and you're able to cover your monthly bills, it pays to keep investing your money at a time like this. Here's why.

A person at a table with an open laptop holding a pen and document.

Image source: Getty Images.

The easiest way to keep up

Not only is inflation making the cost of goods rise, but it's also eating into workers' wages. To put it another way, the $80,000 salary you earn is probably giving you less buying power now than it did at the start of the year because living costs have risen exponentially over the past seven months alone.

That's why now's not a good time to give up on investing. Quite the contrary -- investing your money is one of the best ways to outpace inflation and protect your future buying power.

Where should you invest your money?

If you're socking away funds for retirement, it pays to optimize tax-advantaged savings plans like IRAs and 401(k)s. Traditional IRAs and 401(k)s give you a tax break on your contributions, while Roth IRAs and 401(k)s allow for tax-free withdrawals.

That said, you may not want to tie all of your investment dollars up in an account earmarked for retirement. Though IRAs and 401(k)s offer their share of tax benefits, they're also restrictive. You can't take a withdrawal from one of these accounts before age 59 1/2, for example -- unless you want to pay a costly penalty.

That's why it's important to invest some of your money in a regular old brokerage account. That way, you can access your money whenever you want. And while your investments should not serve as your emergency fund, the reality is that if you need to tap your portfolio in a pinch, that option will exist penalty-free in a regular brokerage account.

What can investing do for you?

Recently, the Consumer Price Index, which measures changes in the cost of consumer goods, rose 9.1% on an annual basis. If that seems like a large jump, it is.

But consider this: From 1957 through 2021, the S&P 500 index delivered an average annual return of about 10.5%. That's enough to outpace the rampant rate of inflation we're grappling with today.

So if you put your money into an S&P 500 index fund, you might grow your savings at a rate that lets you maintain or even gain buying power. And if you invest in stocks you think have the potential to beat the broad market, you might generate even higher returns in your portfolio.

Don't give up on investing

At a time when everything costs so much, your natural inclination may be to focus on hoarding cash. But the reality is that you need to keep investing to keep up with higher costs. And while an IRA or 401(k) could be a very good home for your money, you may want to branch out into a regular brokerage account as well for added flexibility.