Social Security rules are complicated and change often. For the most recent “Ask Larry” columns, check out maximizemysocialsecurity.com/ask-larry.

Economist Laurence Kotlikoff, well known for his Ask Larry Social Security column and his best seller, “Get What’s Yours: The Secrets to Maxing Out Your Social Security Benefits” (co-authored by our Paul Solman and Philip Moeller), advises people on their divorce settlements. Today’s Divorce column provides a warning that where you live can make a big difference in your divorce settlement.

We Americans love lots of things. We love to fall in love, we love to get married, we “love” to get divorced, and we love to move. Almost all of us fall in love (at the very least with our pets), almost all of us get married, almost half of us who get married get divorced, and almost half of us born in one state end up living in another. When our country was formed none of this was true. Marriage was near universal, divorce was unheard of, and most people stayed put.

State rights, one of our nation’s founding principles, made sense back then. It makes far less sense today. But your state of residence determines all kinds of things. These include the penalties for crimes you commit, how much you pay in taxes, how much you can collect in welfare, what you can leave your children when you die, where you can buy beer, whether you can smoke pot, whether you can readily get an abortion, and the list goes on.

And until today, when the Supreme Court made gay marriage legal throughout the land, where you lived also determined whether you could married. Now it’s time for our nation to ditch state-specific divorce rules too.

One of the biggest issues some married couples face when they move across state lines is how they will fare if they get divorced. (And, again, almost half will untie the knot.) The answer may be far better or far worse depending on the state and even the county in which you reside. I say “may,” because if you reach an amicable settlement, that settlement may be legally approved no matter where you live. But if you have a contested divorce and end up leaving it up to a judge, she’ll likely apply state or county guidelines that can be very different depending on the state or country. Indeed, since only a few states and counties in the country have formal guidelines, the guidelines are mostly those set by the local judge. These judges are, of course, influenced primarily by what other judges in their locality and state are doing.

Let me illustrate the world of divorce trouble in which you can land by picking the wrong state of residence. Take fictitious Joe and Sally, a 50 year-old couple who have been married since age 25. Most of their marriage was sheer bliss. But since their four kids left home, Joe and Sally’s relationship has gone off the rails. Whether its Joe’s drinking, Sally’s smoking, or a hundred other things that have gone wrong, both want out.

They face a big, conflict-laden question. How much should Joe pay Sally in alimony? Sally makes $30,000 a year. Joe makes $200,000. They both intend to work through age 67 (the Social Security full retirement age). Joe has a three-times larger Social Security retirement benefit coming his way, and his 401(k) is five times Sally’s. Apart from a small checking account and house equity, Joe and Sally have no other major assets.

Now suppose Joe and Sally live in Massachusetts. According to its online alimony guideline calculator, Joe will need to pay Sally $59,500 annually in alimony indefinitely, but this appears to really mean until Joe reaches 65 (17 years from now). This is the maximum alimony, which is set at 35 percent of the difference in Joe and Sally’s incomes, but can be set as low as 30 percent of the difference.

If the couple lives in Kansas, however, Sally will, based on its state alimony guidelines, receive only $38,000. That’s a third less! And she’ll only collect the $38,000 for 8.77 years. So, on the face of it, Kansas’s alimony—discounting for the time value of money—is less than 40 percent of the Massachusetts amount.

The guideline calculators ignore a host of factors, including differences in asset holdings and future pensions, Social Security, and other income. So if they live in Kansas, Joe can, it seems, walk away with all of his retirement account and Social Security retirement benefit. Yes, Sally can collect half of Joe’s full retirement benefit as a spousal benefit between her full retirement age and 70. Afterward, she will flip onto her own retirement benefit, which is higher. But the story’s the same for Joe. He too can collect a full (if smaller) spousal benefit off of Sally’s work record before taking his own retirement benefit at 70. The main saving grace for Sally, when it comes to Social Security, arrives the instant Joe dies. Once he passes, which could occur when they are both 90, Sally will receive his retirement benefit in the form of a divorcee widow’s benefit.

In short, having been married for a quarter of a century, having raised four children primarily on her own, and having sacrificed her own career for decades, Sally’s reward in Kansas is to live the rest of her life at a far lower living standard than Joe. Things are better for Sally and worse for Joe in Massachusetts, but it’s not clear that Sally will receive any of Joe’s assets since the guidelines appear to be mum on that subject.

If Joe and Sally lived in Texas, the guideline for alimony would be similar to that in Kansas. She would receive slightly more in alimony ($40,000 per year), but for an even shorter duration (only 7 years). But Texas is a community property state, which is the case for neither Massachusetts nor Kansas. So in Texas, Sally would, arguably, have a 50 percent claim on all of the couple’s combined assets, including all their combined retirement accounts. This is also likely in practice in Massachusetts for a long-term marriage, but certainly not a sure thing.

So here’s my question. Why should Joe and Sally, who may have spent most of their life in Massachusetts before resettling to Kansas, end up with such different post-divorce lifestyles just because they moved to Kansas for better jobs, hurricanes, whatever? Isn’t it time we have a national divorce law? After all, this is one nation under God, not 50 states under God, let alone more than 3,000 counties under God. Moreover, why do we let possibly male-hating or women-hating judges arbitrarily decide what’s fair if the divorce settlement is contested? Do the judges handling divorce cases have any training in personal finance? And, as I showed last week, determining a fair divorce, which in long-term marriages requires equal living standards for each spouse going forward, is, in fact, real rocket science, none of which is remotely covered in law school.