Throughout your marriage, you’ve planned for retirement tallying up your work benefits with your spouse’s to make the math come out right. It seemed it would probably work out fine.

Now comes a divorce and a lot of uncertainty. Typically, one of you will have more social security, more in an IRA, a better-defined contribution or even a defined benefit plan. If you go your separate ways, what will happen to those plans, that money, and the retirement you had imagined for so long?

QDRO is going to help

Most retirement accounts carry penalties for early withdrawals and they belong to one person, not a couple. The powerful 1974 federal legislation known as ERISA, which regulates many kinds of retirement plans between employers and employees, keeps a close watch over what happens to them.

If there’s any feel-good part of this story, it may be that ERISA includes a provision creating the Qualified Domestic Relations Order, frequently abbreviated QDRO and pronounced either CUE-droh or QUAD-roh.

QDROs allow a judge to approve divorce agreements dealing with employer-sponsored plans and gives the judge the power to split them up in the ways your attorneys and you and your former spouse have negotiated.

IRAs or defined contribution plans like 401(k)s have a daily balance, so their value is easy to decide and divide. The judge can split them 50/50 or however you’ve agreed.

Defined benefit plans are tougher to value, and therefore tougher to negotiate and value, a judge still has the power to cut them up according to a plan they find acceptable.

Negotiating for what’s fair and what you need

If you’re lucky, you both have roughly the same prospects in retirements. You may both be satisfied with just keeping what you have.

If your accounts match poorly and the marriage has the chance of leaving one of you in bad financial straits down the road, it’s time to negotiate, mediate, arbitrate, litigate, or do whatever needs to be done.

Unlike savings accumulated during your marriage, retirement savings you each had before marriage are not marital property. While you have no legal right to those assets, laws like QDRO guarantee that those accounts can enter into the negotiations anyway.