When it comes to retirement, it’s never too soon to start planning. According to Merrill Lynch, the average retirement costs $738,400. And another study from the Employee Benefit Research Institute found that 37 percent of Americans think they’ll need at least $1 million to enjoy a comfortable retirement. If you plan to retire at normal retirement age—typically 66 or 67 for most people—you’ve likely got several decades to save. If you’ve set a goal to retire by 40, on the other hand, your time to get your financial ducks in a row just shrank dramatically. But that doesn’t mean you can’t do it. Here’s how.

A couple looking at their laptop to retire by 40.

Envision Your Ideal Retirement

Retirement means something different to everyone. If you’re planning to retire by 40, you need to think about how you’re going to spend the next as-many-as four decades, assuming you have a normal life expectancy.

Do you plan to travel part of the year, for example, or become a full-time nomad? How will your day-to-day spending habits change? Will any of your expenses go up or down? Do you want to volunteer or start your own nonprofit? Will you still work part-time or do you have plans to launch a business?

All of these things can affect how much money you’ll need to save for the future. Once you’ve thought it through, you can dig into the numbers.

Set Your Savings Goal

Nailing down a set dollar amount that you need to save is difficult enough under normal circumstances, but it is considerably more challenging when you’re retiring early. One rule of thumb, for instance, advises multiplying your desired annual income in retirement by 25. So, if you want to have $50,000 a year for 25 years, you’d need $1.25 million. If you’re looking at an extra 20 years in retirement, you’d need $2.25 million instead.

Of course, you may be able to set the numbers a little lower if you’ll have money coming in from a side hustle or a business in retirement. Taking a second look at your budget to see if you can get by with less income each year (one reason some people retire abroad) could also shift the numbers, as would factoring in Social Security payments once you reach your 60s.

Break Down Your Monthly Savings Rate

Once you have an idea of what the long-term goal is, look at how much you already have saved and how long you have until you turn 40. This will give you a framework for how much you need to save each year and each month to get there.

Let’s say you’re 25 years old, making $50,000 a year, and you’re just beginning to save. To retire by 40, you’d need to commit to saving roughly half of your income each month. Do that and, according to this calculator, you’d be able to count on just under $1,300 a month in income. This may not go very far unless you’re willing to cut your lifestyle significantly.

Saving half your income is doable, but you may need to aim even higher if you want to have more money to live off each month once you retire. If you need to save more, you’ve got two options. First, you can trim down your expenses as much as possible. Getting a roommate or two, selling your car and using public transportation instead, or canceling your cable TV can reduce your outflow.

Next, you can work on increasing your income and saving the extra money. You could increase your hours at work, take on a part-time job or start a side hustle to add to your cash flow. If those aren’t options, you can always try selling things you don’t need for extra savings.

Choose the Right Savings Vehicles

If you’re saving on a shorter time frame, you need to be strategic about where you save. Your employer’s plan is an obvious choice, especially if your company gives you a matching contribution. Let’s say you make $50,000 a year and start saving at age 25. You save 35 percent of your income in your 401(k), and your employer matches 100 percent of the first 6 percent of your contributions. By age 40, you’d have almost $535,000, if you earn a 7 percent annual rate of return.

That’s only about halfway to your $1 million goal, but don’t worry. You can make up some of the difference by saving in a Roth IRA. Using the current annual contribution limit of $5,500, you could add another $147,000-and-change to your retirement savings, assuming a 7 percent annual return. From there, you could continue saving and investing in a taxable brokerage account.

The bottom line when it comes to retiring by 40 is that you have to be proactive. Running the numbers and taking advantage of every opportunity to save is a must. The sooner you start planning, the better the odds of retiring early with the kind of nest egg you’re aiming for.

Compare Popular IRA Providers