I’m in the middle of No-Spend January. At the end of last year, I hosted parties, bought presents, and treated myself. Although I don’t regret how I spent that money, I felt like I had less control over my finances than I’d like.

So, I’m using this no-buy challenge to hit the reset button and resist temptation and only spend on essentials, and hopefully to get a couple of things out of it.

The benefits of No-Spend January

First, I want to get out of spending mode. I’m not typically a big spender anyway, but once I start, it’s all too easy to keep going. And there’s a reason for that—a cognitive bias known as hyperbolic discounting. We tend to place greater weight on immediate satisfaction, even if focusing on the long term will have a greater payoff. Furthermore, feeling stressed about finances can also get us off track. While some people respond to financial stress by saving more, others respond by spendingmore in order to regain feelings of control.

Second, I want to move into saving mode. Though spending in the moment can be satisfying, the things I’m saving for—long-term goals like retirement and some shorter-term goals, too—would pack a bigger punch over time. For example, I live in an old house, and I want to check off several home improvement projects while still being able to take a nice trip this year.

So far, I’ve stuck to my commitment, but No-Spend January hasn’t been easy. I’m bombarded with social media posts pressuring me to spend and an endless stream of marketing emails. And even in stores, I’m now keenly aware of how they’re set up to encourage impulse buying (I almost ended up the not-so-proud owner of a new travel tumbler when I ran out to get tea).

Fortunately, being a behavioral scientist has helped me not just stick to No-Spend January but also turn it into an opportunity to improve my finances by saving more. If you’re along for the ride, maybe this will help you, too.

How to avoid spending and motivate saving

1) Do a goals audit

Goals can motivate you, so make a list of what you’re saving for. If you don’t already have them in mind, there are techniques to help you find and articulate your financial goals.

Research shows that the most motivating goals often relate to security, such as retirement, or self-actualization, such as opening a business or contributing to charity.

It’s also helpful to connect your goals to boost motivation. For example, I could pair “save for vacation” with “donate to charity” by giving any amount left over from my vacation budget to my favorite nonprofit. Whenever you feel yourself wavering, come back to your goals for a dose of motivation.

2) Figure out what you can and should save

This step may not make me popular with the math-averse, but it’s important. When we’re stressed about money, we may convince ourselves that all our current spending is more of a priority than saving. So, start by doing a full review of your budget. No-Spend January is the perfect time for this because you’re inherently only spending what you need to.

How much money comes in each month, how much goes out, and where does it go? You may find that you already have a surplus. This is an easy win: Commit to saving that much money each month. You can even decide how much of it goes toward each of your financial goals. But if there’s no extra money, take a hard look at your spending and figure out where you can spend less.

Give yourself a bit of a reality check, too, by calculating how much you need to save each month to achieve your goal when you want to. It’s especially eye-opening to calculate how saving more or less each month can affect your ability to retire. Don’t get discouraged if you can’t save as much as you’d like right now. That happens to everyone. But by saving what you can now and coming back to this practice when your circumstances change, you can still make serious progress toward your goals.

3) Take it out of your hands

OK, you’ve decided what you’re saving for and how much. Now automate it. Because let’s face it, if you have to manually transfer money into savings, chances are it won’t always happen. But if you remove yourself from the process, you’ll save more and be more likely to stick with your plan for months or years to come. I already feel more at ease knowing the money I need for home improvements is automatically moved to my savings.

No-Spend January only lasts a month, but it can inspire better saving habits that serve us all year—and beyond.

Get Morningstar insights in your inbox