Chances are, Social Security will serve as a critical source of income for you in retirement, so it's important to file for it at the right time. Though your Social Security benefits are based on your earnings history, the age at which you claim them can cause your monthly payments to go up, go down, or stay the same.

If you file for Social Security at full retirement age, or FRA, you'll get the exact monthly benefit your earnings record entitles you to. That age is either 66, 67, or 66 plus a certain number of months, depending on your year of birth. That said, you can file for Social Security well before FRA -- as early as age 62. Or, you can delay benefits past FRA and file at a later point in time.

Smiling senior man and woman sitting on couch, facing each other while man's hand hovers over laptop on coffee table

IMAGE SOURCE: GETTY IMAGES.

For each month you claim benefits ahead of FRA, you'll reduce your monthly payments up to a maximum of 30% (that would be the case if you were to file at the earliest possible age of 62 with an FRA of 67). On the other hand, you'll boost your benefits by 8% a year by delaying them past FRA, up until you turn 70, at which point there's no financial incentive to hold off on filing.

Now there are several factors you'll need to consider when deciding when to claim Social Security, such as your need for money now versus later, whether you're still working, and what you'll do with that money. But if there's one factor that will really help you narrow down a filing age, it's none other than your health.

Why your health matters

One lesser-known fact about Social Security is that it's technically designed to pay you the same total lifetime benefit regardless of when you file. The logic is that filing after FRA will boost your monthly benefits, but you'll collect fewer individual payments, or vice versa -- filing early will shrink your benefits, but you'll collect them for longer.

Now if this is the case, you may be thinking: "Why does it even matter when I file?"

The answer is that the above formula assumes that you'll live an average life expectancy. If your health is great, and you therefore expect to outlive the average senior, then you'll generally come out ahead financially by waiting as long as possible -- age 70 -- to file for benefits. And if your health is poor, the opposite holds true -- you're generally better off filing as early as possible -- age 62.

Imagine you're entitled to a $1,500 monthly benefit at an FRA of 67. Filing at 62 will reduce each individual payment you receive to $1,050, but you'll collect 60 more payments. You'll break even under both filing scenarios with roughly $210,000 in total income once you're just over 78 1/2.

But watch what happens if you die at 74 from health issues. Suddenly, you're coming out over $25,000 ahead by filing at 62 instead of 67.

Now let's imagine your health is fantastic, and so you decide to delay Social Security until age 70. Doing so will increase your $1,500 monthly benefit to $1,860 a month, but you'll collect 36 fewer payments. At age 82 1/2, you'll break even with a total of $279,000 in lifetime Social Security income. But if you live until age 90 (which, incidentally, one in four 65-year-olds today are expected to do), you'll come out $32,400 ahead by virtue of having waited as long as possible to file.

That's why you must take your health into account when deciding when to claim benefits. Though it's ultimately impossible to predict how long you'll live, your health can be a pretty strong indicator.