Say you’re diligently saving money for your upcoming wedding, you plan to own your own business someday, and then in 40 years you want to retire to a beautiful farm. How do you juggle such different financial goals?

Near-term expenditures can be easy to picture and budget for, but long-term goals can seem vaguer and harder to prioritize. Yet the future plans may be the most important ones of all.

“We’re trying to save for our futures; pay off our past, by paying down debt; and live our lives in the present. It’s not easy,” says Liz Weston, a NerdWallet columnist and personal finance expert.

To make it a little easier, follow the rule of saving first for the goal that will happen last. Attack the long-term goals first, and then use your remaining resources toward short-term and intermediate ones, says Molly Balunek, president of Laurel Tree Advisors, a financial and investment planning firm in Cleveland. That way, Balunek adds, you’re “making sure the short-term goals don’t sabotage the long-term ones.”

For example, retirement is a goal that should be a priority for everyone. “[Retirement is] a huge expense, and saving for it shouldn’t be delayed, because the longer you put it off the harder it is to catch up,” Weston says.

Aside from a bucolic idea of farm life (or golf course, or whatever your dream may be), there are many financial incentives to save for retirement. When you contribute to an employer’s 401(k) plan or a traditional or Roth IRA, you’ll enjoy valuable tax breaks and a long investment time horizon for your money to grow.

If you have a 401(k) plan at work, start there. “One rule of thumb for retirement savings is to put away 10% of your gross salary each month,” says Pamela Zedick, a certified financial planner with Zuk Financial Group in Dana Point, California. Some companies match employee contributions dollar for dollar, up to a cap such as 3% or 6%. If 10% is a stretch, aim for at least enough to nab any employer match you’re entitled to.

» MORE: Best bank tools for saving money

With savings goals that are five to 10 years out — startup funds for a business, perhaps — you may have only a vague idea of how much you need. Estimating a dollar amount can motivate you to make progress toward the goal.

“The key to building savings … is to develop those goals with great detail and clarity. For example, if you want to start your own business one day, make that mental picture as vivid as possible,” says Cynthia Boman Thompson, a certified financial planner with Cinder Finance in Portland, Ore.

If you create a spreadsheet with dollar estimates for office rental, a website, marketing materials and so on, you may be able to zero in on a specific dollar target, such as $50,000. “Once you have such a vivid picture of what you are trying to achieve, it is usually much easier to stay motivated and stick to your savings plan,” Thompson says.

For intermediate goals, keep the money invested so it has a chance to grow. Consider setting up an automatic electronic funds transfer to a brokerage account, using “for example, a balanced fund that may provide return without too much equity or market risk,” says Charlotte Dougherty, president of Dougherty & Associates, a financial planning firm in Cincinnati.

» MORE: Best tools for budgeting and saving

Short-term goals are usually in sharpest focus. If you want a $4,000 Vera Wang wedding dress and there’s a year to go before you’d have to order it, simply divide the dollar amount by 12 to figure the amount you need to set aside every month. But then consider the impact of that purchase on your intermediate and long-term goals.

You may find you don’t have enough to do everything. That’s when you can start playing with the numbers and making some trade-offs.

“Maybe a $2,000 dress will work, or you retire a couple of years later, or you save $25,000 and take out a small-business loan,” Weston says. “You move the puzzle pieces around to find a combination that works.”

Jeanne Lee is a staff writer at NerdWallet, a personal finance website. Email: jlee@nerdwallet.com. Twitter: @jlee_jeanne.

The article How to Save for 2017 and 2057 at the Same Time originally appeared on NerdWallet.