Retiring early—before the traditional age of 65 or older—means having time to enjoy your work-free life on your own terms, before the hindrances of advanced age and potential health concerns get in your way. Maybe you hope to stop working early to spend more time with your family, or take all the trips on your bucket list. Whatever the reason, retiring early requires focused discipline and dedicated saving and investing.

Unless money is no object, most people need two things to be able to retire early: a significant amount of assets and an uncommon discipline in managing spending, says Adam Holt, CFP, ChFC, CEO and founder of Asset-Map.

Say you want to retire by age 50. Your roadmap to get there will depend on where you’re starting, and your current financial situation, as well as where you live and the lifestyle you want in retirement, says Jordan Sowhangar, CFP, wealth advisor at Girard. But regardless of your specific situation, you’ll need “a lot of planning and discipline,” she says.

Where to start?

Cut your spending now—and plan to live modestly during retirement

If you spend a lot of money now and plan to continue spending a lot in retirement, early retirement may not work for you.

“The real key to financial independence is living affordably,” Holt says. “Many Americans have created enough resources to consider retiring early; it would just mean sacrificing their current spending lifestyle to get there.”

To break that pattern and retire early, you’ll have to avoid debt and live well within your means. That means cutting expenses wherever you can, avoiding big mortgages and credit card debt and living on a tight budget leading up to your retirement goal, Sowhangar says. Once you reach your goal of retiring early, you’ll need to stay committed to living on a budget for the rest of your life.

Remember, retiring by 50 means living comfortably without creating earned income for potentially 40 years or more, Holt says. And once you’re halfway through retirement, you probably won’t have “a lot of do-over opportunities” if you encounter unforeseen expenses, he says.

Living on less is a crucial first step, but it’s only part of the equation. You’ll also need to save religiously and invest wisely to meet your goal of early retirement.

How much do you need to retire?

Good question. Before developing a savings plan, you need to figure out how much money you’ll actually need to retire early.

In retirement, most people need about 75 percent of the amount they need to live while working, Sowhangar says. Determine what that figure would be and multiply by the number of years you expect to live in retirement. “Of course, nobody knows how long they will live, so take into account family longevity, and then overestimate that age,” she says.

For example, if you currently live on $50,000 annually, 75 percent of that is $37,500 per year in retirement. If you retire at 50 and anticipate living until age 85, you’ll be retired for 35 years. Multiply $37,500 by 35 years and that shows you will need roughly $1.31 million saved to sustain you throughout retirement. This basic equation can help you determine a ballpark figure to set as your savings goal.

Healthcare expenses represent one caveat. People who retire at 65 or older have access to Medicare to cover health expenses, but if you retire at 50, you’ll have to pay for health care costs out of pocket for 15 years. To account for healthcare expenses, you may need to estimate for more than 75 percent of your current expenses until you reach Medicare age.

Most financial advisors say you can count on a 4 percent sustainable distribution rate, Holt says. That means you can divide the annual expenses you’ll need to come from your retirement savings by 0.04 and it will give you a reasonable idea of the assets you’ll need at retirement. If you own real estate—and collect rent regularly, for example—or have business interests, you may not need as much in savings, as those assets can be “income rich,” Holt says. “These two types of investments are how most of the traditional wealth in America was made.”

How can you save for retirement?

Accumulating $1 million or more before reaching the age of 50 is a lofty goal, but it’s doable. Start by saving “as early as possible and as much as possible,” Sowhangar says. To achieve retirement by age 65, most advisors recommend people save at least 10 percent to 15 percent of their paychecks for retirement. If you want to shorten your working years by 15 or more years, you’ll need to save more like 20 percent to 40 percent or more of your paycheck, depending on when you started saving.

Start saving and investing as early as possible so you can benefit from compounding interest. By saving early and allowing interest to compound, you can accomplish your goal without socking away nearly as much money as if you start saving later.

Where should you invest your savings?

If you’re hoping to retire early, “you need your money to work for you during the accumulation phase of your life,” Sowhangar says. “For a good part of this phase, you will want your portfolio to be more aggressive and consist of mainly a diversified portfolio of equities [or stocks], as this is where you can take advantage of long-term market growth potential.”

Focus on growth assets with both domestic and global diversification, says Joshua Palleon, CFA, managing director, investment strategy at BMO Wealth Management. “This would include stock investments across large-, mid- and small-cap companies in the U.S. as well as exposure to foreign investments, including emerging markets. The combination of these various asset classes in an efficient manner can help you maximize returns while effectively managing risk.” (Acorns portfolios contain exposure to thousands of stocks and bonds.)

To retire early, you’ll likely need a healthy tolerance for risk—because more aggressive investing will allow your portfolio to grow more quickly. And you’ll have to be prepared to ride out the ups and downs of the stock market while remaining focused on your goal. Remember that the stock market will experience volatility on a regular basis, though the overall trend has been up over time. “It’s important to have a plan that you are comfortable with through those periods,” Palleon says.

Finally, make sure you keep enough cash on hand for current spending needs and unexpected emergencies while you’re still working. That way, you can avoid selling growth assets during market lows, allowing your retirement assets to build most effectively over time, Palleon says.