Social Security is an integral source of income for millions of retirees, but only half of U.S. adults say they know how to maximize their benefits, according to a 2023 survey from the Nationwide Retirement Institute. While the program can be confusing at times, knowing at least the basics of how your benefits are calculated can ensure you're squeezing every penny out of Social Security.

If you're planning on retiring soon, there are three little-known rules that you should know.

1. You may be eligible for spousal or divorce benefits

Retirement benefits are the most common form of Social Security, and you generally become eligible for them after working and paying taxes for at least 10 years. But if you're married or divorced, you could also qualify for spousal or divorce benefits.

Two people standing outside and hugging.

Image source: Getty Images.

To receive spousal benefits, you must currently be married to someone entitled to either retirement or disability Social Security. The maximum you can receive is 50% of the amount your spouse is eligible for at their full retirement age (FRA).

To qualify for divorce benefits, you can't currently be married (although it's OK if your ex-spouse has remarried), and your previous marriage must have lasted for at least 10 years. Like with spousal benefits, your maximum payment is 50% of your ex-spouse's benefit at their FRA.

In both cases, you can receive extra benefits even if you're entitled to your own retirement benefits -- but you'll only receive the higher of the two amounts. For example, if you're entitled to $800 per month based on your own work record and your spouse qualifies for $2,000 per month at their FRA, your spousal benefit would be $1,000 per month. In this case, you'd receive $1,000 per month -- not $1,800 per month.

2. You can undo your claiming decision if you change your mind

In general, your benefit amount is locked in for life once you begin claiming. But if you change your mind, you have one opportunity to undo your decision. Roughly 70% of U.S. adults are unaware of this rule, according to the Nationwide survey, but it could be a game changer if you regret your claiming decision.

You can only withdraw your application once in the first 12 months after filing for Social Security, and you'll also need to repay all the benefits you've received so far. But after that, you can file again whenever you choose.

If you miss the 12-month window or can't afford to repay your benefits, though, there's another option: suspending your benefits. Once you reach your FRA, you can press pause on collecting payments up to age 70. When you decide to start receiving checks again, the Social Security Administration will recalculate your benefit amount and you'll collect larger payments each month.

While most people probably won't need to undo their claiming decisions, it's a good rule to know. If you file early and then regret your choice, you're not stuck with it for the rest of your life.

3. The length of your career affects your benefit amount

Three major factors affect the amount you receive from Social Security: your earnings, the age at which you begin claiming, and the length of your career. This third factor isn't as well known, and more than 60% of U.S. adults are in the dark about it, according to the Nationwide survey.

The Social Security Administration calculates your benefit amount by taking an average of your wages over the 35 highest-earning years of your career. That number is then adjusted for inflation, and the result is the amount you'll receive by filing at your FRA.

If you begin claiming before you've worked 35 full years, you'll have zeros included in your average -- which will reduce your benefit amount. Before you file, then, it's wise to double-check you've worked at least 35 years to avoid any surprises in retirement.

Social Security can go a long way in retirement, and the more you know about how the program works, the better off you'll be. By understanding these lesser-known rules, you can set yourself up for a more financially comfortable retirement.