Rules can be annoying sometimes, but many of them, such as "look both ways before crossing the street," can keep us alive and well. There are some valuable rules related to retirement, too, and if you keep them in mind, your last decades can be much more comfortable than they otherwise would have been.

Here are five important things to understand about retirement -- and to factor into your planning.

A chalkboard reading WHAT ARE THE RULES?

Image source: Getty Images.

1. Have a plan

First things first: You need to have a plan for your retirement. Leaving it all up to chance and hoping that you've socked away enough money can leave you in perilous shape later on. So grab a pad and pen and a calculator. Figure out how much you need to save for retirement and how you'll accumulate what you need. There's no one-size-fits-all number, but some experts suggest you'll need 80% of your income when you retire. So if you retire earning $80,000 a year, you'll want to aim for $64,000. That would be the total income you'll need each year.

Some of it will likely be Social Security benefits, and much is likely to come from your savings. One way to help you figure out how much you need to save is to invert the 4% rule, and multiply your desired annual income from your nest egg by 25. (The 4% rule is a very rough guide to how much money you can withdraw from your nest egg in retirement in order to make it last.) So, for example, if you want to be able to draw $30,000 from your nest egg in your first year of retirement, you'd multiply that by 25, getting $750,000. You'd need to retire with $750,000 saved.

No matter what sum you need, the sooner you start saving and investing, the better off you'll be -- even if you're only in your 30s. After all, the younger you are, the longer your money can grow for you. Check out the following numbers:

Growing at 8% for...

$5,000 invested annually

$10,000 invested annually

$15,000 invested annually

10 years

$78,227

$156,455

$234,682

15 years

$146,621

$293,243

$439,864

20 years

$247,115

$494,229

$741,344

25 years

$394,772

$789,544

$1.2 million

30 years

$611,729

$1.2 million

$1.8 million

Data source: Calculations by author.

This simple online calculator can help with your planning and number-crunching. It's meant to calculate interest, but you can swap in your expected investment growth rate for the interest rate, and then try out different savings levels. For example, if you start with $0, sock away $8,000 per year, and expect it to grow by 8% annually, on average, over 25 years, you'll end up with nearly $632,000. Try different scenarios that are realistic for you.

It's also helpful to take advantage of retirement accounts available to you, such as traditional and Roth IRAs, and traditional and Roth 401(k) plans at work. Also avoid borrowing from 401(k) accounts, or cashing them out when you change jobs, if you can. Even if your 401(k) has only $20,000 in it when you leave your job, if that sum can keep growing for another 20 years and averages an annual return of 8%, it will grow to more than $90,000 -- which can be very meaningful in retirement.

2. Stay active -- both physically and mentally

When planning for your retirement, don't focus only on financials. Yes, you'll need enough money to sustain you, but there are other important considerations. For example, 10% of retirees have been surprised to find themselves lonely, bored, with a lost sense of purpose, and/or depressed in retirement, according to a 2014 MassMutual survey. (Fortunately, 72% of respondents reported feeling quite happy or extremely happy.) The routine of working is more important to some of us than we realize. Brace yourself for its loss and consider how you might deal with it -- maybe by getting a part-time job or taking up new hobbies. Be prepared to make some adjustments. Know that you'll probably need help in retirement, too, so expect that and perhaps practice asking for help now and then.

Plan to stay active and social in retirement, too. It's important to stay active for your physical health, as that can keep your bones and heart strong. It can also help you live longer and potentially spend many thousands of dollars less on healthcare. Being social has been shown to pay big dividends as well, such as keeping you mentally and physically healthier -- and possibly even keeping dementia at bay.

3. Be ready for steep healthcare costs

Speaking of healthcare, we all know that it's a costly expense -- but few appreciate just how costly it can be as we get older. Fidelity Investments has estimated that a 65-year-old couple retiring today will spend, on average, a total of $275,000 out of pocket on healthcare during their retirement (excluding long-term care). That's an average, of course -- you might spend less, or more. Still, it's critical to incorporate healthcare in your retirement planning. One way to keep those costs in check is to make smart Medicare-related moves.

A spigot dispensing a stream of $100 bills

Image source: Getty Images.

4. Consider an annuity for dependable income

Since relatively few of us have pension income to look forward to, you might consider creating pension-like income in a different way -- via one or more annuities. Focus on fixed annuities as opposed to variable or indexed annuities (those can be problematic, with steep fees and restrictive terms). Here's the kind of income that various people might be able to secure in the current economic environment in the form of an immediate fixed annuity:

Person/People

Cost

Monthly Income

Annual Income Equivalent

65-year-old man

$100,000

$551

$6,612

70-year-old man

$100,000

$632

$7,584

70-year-old woman

$100,000

$592

$7,104

65-year-old couple

$200,000

$941

$11,292

70-year-old couple

$200,000

$1,036

$12,432

75-year-old couple

$200,000

$1,195

$14,340

Data source: ImmediateAnnuities.com.

A key retirement concern is making sure you don't run out of money. Another strategy to avoid running out of money before you run out of breath is investing in a deferred fixed annuity (sometimes called longevity insurance). Instead of starting to pay immediately, it starts paying at a future point, such as when you turn a certain age. For example, a 70-year-old man might spend $50,000 for an annuity that will start paying him $933 per month for the rest of his life beginning at age 80.

5. Make the most of Social Security

Finally, think strategically about Social Security, because the size of your ultimate benefit checks is in many ways under your control. Start by finding out how much money you can expect to receive from the program, via a visit to the Social Security Administration's website. To give you a rough idea, the average Social Security retirement benefit was recently $1,411 per month, or about $17,000 per year, while the maximum benefit for those retiring at their full retirement age was recently $2,788 per month -- or about $33,000 for the whole year.

Know that you can increase or decrease your benefits by starting to collect Social Security earlier or later than your "full" retirement age, which is now 66 or 67 for most of us. Read up on strategies to maximize your Social Security, especially by coordinating your actions with those of your spouse, if you're married. For example, the spouse with the lower expected benefits might start collecting early, so that the other spouse can delay starting to collect, making the ultimate benefits heftier.

The more you read up on and think about retirement, the more delightful and low-stress your golden years are likely to be -- especially if you take some important steps now and develop a good plan.