Everyone has an idea of how they'd like to spend retirement. The hard part is figuring out how much we need to save to make those dreams reality. Image source: Flickr user Ben Kucinski.

Retirement is something we all have to plan for, and a major part of that planning is figuring out your "retirement number," or the amount of money you need to save in order to retire with the standard of living you want. Unfortunately, the typical American doesn't know what that number is.

In a Transamerica Center for Retirement Studies survey of 4,550 Americans, 53% of respondents said they had "guessed" how much they needed for retirement.

But you can do better. Let's take a look at the key components needed to figure out how much you need for retirement.

First, let's talk expenses
Will you need to pay for housing in retirement? Put differently, will you be renting or paying a mortgage? This monthly expense is a major factor in how much retirement savings you will need. According to the Consumer Finance Protection Bureau, the number of homeowners aged 65 and older who carry mortgage debt nearly doubled from 2001 to 2011 from 3.8 million to 6.1 million. And elderly homeowners with a mortgage spent an average of $1,257 per month on housing -- a full 290% more than the $434 that seniors without mortgages paid each month.

And then there's healthcare. Even if you're eligible for Medicare, it won't be cheap. As of 2011, Medicare only covered 62% of healthcare costs for beneficiaries aged 65 and older. Fidelity conducted an analysis estimating that an average couple retiring in 2014 would need $220,000 saved to cover medical expenses. That number rises if you need more services or more expensive treatment than the average retiree, so consider your health needs before designing that budget.

Also keep in mind that sudden shocks can make a big difference: A 2015 analysis by the Employee Benefit Research Institute showed that retirees aged 85-plus who had to stay in a nursing home at some point paid an average of $24,185 out-of-pocket over a two-year period. It doesn't take long for that kind of money to pile up. Long-term care insurance may help, but be aware of the issues with taking out a policy.

And then there are other living expenses. You'll want to build a budget for additional necessities (food, clothing, and the like) and enjoyment (hobbies, travel, gifts for the grandkids). Maybe there are other things that are unique to your situation. How much do you plan to spend on them each month?

Got those numbers?

Income streams and taxes
When it comes to your retirement income, your savings should be the big headline number. I'll talk more about how to calculate that below, but they will be a critical part of any retirement plan.

Then there's Social Security. The size of your benefit checks depends on your lifetime earnings and various other factors. While the average monthly benefit paid out to retirees is currently $1,328, a number of calculators can give you a better picture of your own benefits based on your specific circumstances. How early you plan to take Social Security factors into that benefit: Each year you wait from age 66 to age 70 increases your benefit by 8% -- although the reality is more complex than the headline number.

And then there's other income. Thinking about working part-time in retirement? The monthly income is a nice plus, as is employer-subsidized healthcare. There are also potential health benefits. Do you have rental properties, royalties, or anything else along those lines? Consider them as well.

Retirement is not just about how much you have saved -- it's also about how you saved it. If your money is in a traditional IRA or 401(k), it will be taxed upon withdrawal. A lot depends on your tax bracket, so you'll need to consider how much Uncle Sam is going to set you back. If you're invested in a Roth IRA or Roth 401(k), there's no adjustment needed, as withdrawals from Roth accounts are tax-free.

Nearly all income streams have some tax implications, so it's generally best to consult a tax professional.

Tying it all together
Subtract monthly income from monthly expenditures and you have an estimate for what you'll need from savings on a monthly basis. Once you've multiplied that number by 12 to find one year's expenses, you can arrive at an overall savings goal by using the 4% retirement rule. By this rule, you spend 4% of your savings in your first year of retirement and then adjust your withdrawals for inflation each year after that. So if you needed to come up with $15,000 in your first year of retirement -- and each year after that, adjusting for inflation -- then the 4% rule would dictate having $375,000 in savings.

Bottom line: Everyone's retirement number is different. And given that there is always the possibility of a major financial shock -- disease, a stock market crash, collapse in real estate values, etc. -- after retirement, any number you pick now may need some extra wiggle room built in. But the most important thing is to have a plan and to budget your current savings accordingly so you can live well in your golden years.