When you're saving for retirement, the ultimate goal is to squirrel away enough to last the rest of your life. However, that's much easier said than done.

The median amount baby boomers have saved for retirement is just $152,000, according to a report from the Transamerica Center for Retirement Studies. Yet a separate survey from Charles Schwab found that the average worker thinks retirement will cost around $1.7 million.

Retirement could be far more expensive than you think, and it's challenging to prepare for your senior years when you don't know exactly what costs to expect. That said, there are a few signs your savings are on the right track. If you've done these three things, there's a better chance your savings will last a lifetime.

Senior couple sitting on a bench at the beach

Image source: Getty Images.

1. You have an accurate estimate of how much you expect to spend each year in retirement

The first step to figuring out how much you should save by retirement age is estimating how much you'll spend every year once you retire. One commonly cited guideline is to assume you'll be spending around 75% to 85% of your pre-retirement income. So if you're spending, say, $50,000 per year currently, you may spend around $37,500 to $42,500 per year in retirement.

However, those are very rough estimates, and the most accurate way to predict your future spending is to create a retirement budget. This budget may look similar to your normal budget, but consider all the ways your expenses could change. For example, you may be able to reduce your transportation costs when you're no longer commuting, but your travel expenses could increase if you plan on taking a lot of trips

Of course, it's impossible to predict exactly how much you'll spend in retirement, and your costs could fluctuate from year to year. But the more thorough your retirement budget is, the more prepared you'll be.

2. You've accounted for healthcare and long-term care costs

Two costs, in particular, to account for in your retirement budget are healthcare and long-term care. Even if you're covered under Medicare, you'll still face plenty of out-of-pocket costs -- including premiums, deductibles, copays, and coinsurance. Original Medicare also doesn't cover prescription drugs or routine dental and vision care, so to avoid paying for those expenses out of pocket, you'll need to buy additional coverage.

The average retiree spends around $4,300 per year on out-of-pocket medical expenses, according to a report from the Center for Retirement Research at Boston College. But if you have health issues or know you'll be taking frequent trips to the doctor, you may need to budget more for healthcare costs.

Long-term care can also take a serious bite out of your retirement budget. The average semi-private room in a nursing home costs around $6,800 per month, according to the U.S. Department of Health and Human Services. Also, around 70% of Americans will require long-term care at some point, and among those who need this type of care, the average person requires it for around three years. If you're paying $6,800 per month for this care, that amounts to close to $250,000 over three years. And here's the kicker: Medicare typically won't pay for long-term care.

To prepare for these costs, it's a good idea to consider long-term care insurance. This type of insurance isn't cheap, however. You could potentially pay thousands of dollars per year in premiums, and the price skyrockets the longer you wait to enroll. But if you end up needing long-term care for several years in your old age, insurance could be worth the hefty cost.

3. You've considered your life expectancy

As you're heading into retirement, the last thing you probably want to think about is how many years you have left. But if you want to ensure your money lasts as long as possible, life expectancy is a critical component of your retirement plan.

The average 65-year-old man and woman can expect to live to around 84 and 86 years old, respectively, according to the Social Security Administration. However, a third of today's 65 year olds are expected to live past age 90, and around one in seven will make it past age 95.

Although it may be impossible to predict exactly how long you'll live, look at your current health and your family history to estimate it the best you can. If you drastically underestimate how long you'll live, that could result in running out of money too soon. So the more accurate idea you have of approximately how long you'll live, the better you'll be able to prepare financially.

Saving for retirement isn't easy, especially when you have to save enough to live comfortably for several decades. However, by creating a thorough retirement plan and preparing for your future expenses as much as possible, you'll be on the right track to ensure your savings will last the rest of your life.