Social Security helps millions of seniors stay afloat financially during retirement, and while the formula used to calculate those benefits on an individual basis is a touch complicated, the gist of it is that your monthly benefit is based on your average wages, adjusted for inflation, over the course of your 35 highest-paid years in the workforce.

But what if you didn't put in 35 years in the workforce -- or any time, for that matter? It's not an uncommon scenario. Many seniors today had children at a young age, stayed home to raise them, and then never entered the workforce once their kids grew up and moved out. If that sounds like you, you might assume that you won't get a dime from Social Security once retirement rolls around. But actually, here's some good news -- if you're married to someone who's entitled to benefits based on his or her work record, or you've divorced from someone in the same situation, you may be entitled to a benefit of your own after all.

How spousal benefits work

Even if you never earned an income yourself, if you're married to or divorced from someone who's entitled to Social Security, you may be eligible for spousal benefits that amount to up to 50% of your husband or wife's benefit at full retirement age (which is either 66, 67, or somewhere in between, depending on year of birth). This means that if your spouse's monthly benefit is $2,000 at full retirement age, you could collect $1,000.

In order to collect a spousal benefit, your spouse must file for benefits first, if you're married. The rules are a bit different if you're divorced. You should also know that if you worked part-time when you were younger, and are therefore entitled to a small benefit of your own, you can get bumped up to your spousal benefit once you're entitled to claim it. In other words, if your monthly benefit is $700 based on your earnings history, and your spousal benefit equals $1,000, you'll be eligible for the larger of the two.

Keep in mind that if you claim your spousal benefit before reaching your own full retirement age, your benefit will be reduced. The same would apply if you were to claim your own benefit early.

Furthermore, if you're claiming benefits on your own earnings history, you get the option to delay them past full retirement age and grow them in the process -- but that's not how spousal benefits work. You can't grow your spousal benefit, so once you reach full retirement age, you might as well claim it -- assuming your spouse has already filed.

Now if you're divorced, you're entitled to a spousal benefit as long as your marriage lasted 10 years and you're not remarried. The rules regarding spousal benefits for divorced seniors are largely the same -- you're entitled to up to 50% of your ex-spouse's benefit, and if you're eligible for a benefit of your own, you'll be bumped up to that spousal benefit if it's higher than yours. The key difference, however, is that as long as you've been divorced for at least two years, you don't need to wait for your ex-spouse to claim benefits before filing for your spousal benefit. As such, you get a bit more flexibility.

Even if you never earned money a day in your life, you can still receive benefit from Social Security. Read up on how spousal benefits work so you can make the most of the money you're entitled to.

This article originally appeared in the Motley Fool. The Motley Fool has a disclosure policy.