Marriage is usually talked about in terms of love and relationships—the intensity of emotion you feel toward one another, and the safety and security of finding your Person and knowing you’ll spend the rest of your life with them.

Except, of course, that the time spent married is typically less than a decade—most marriages in the U.S. end after about seven years. Most marriages end in divorceabout half of all first marriages wind up in divorce court, and that rate skyrockets with second (67%) and third (73%) marriages.

That’s why it’s important to remember that marriage is a legally binding contract as much as it is a symbolic joining of two souls. Viewed like that, stuff like pre-nuptial agreements don’t seem so cold and brutal; they can be a godsend if your marriage is one of those that don’t make it. If you’ve already gotten married, it’s not too late to get rational about your partnership and enshrine your mutual understanding in writing, though. You can always draw up a post-nuptial agreement.

Post-nuptial agreements

A post-nuptial agreement is exactly what it sounds like: a legal agreement between spouses that you create and sign after you’re already married. You might enter into one because you didn’t create a pre-nuptial agreement and want to clarify things, or your financial situation has changed and now you feel the need to formalize some understandings. The crucial difference is the focus of the document: A pre-nup is mostly focused on you as an individual, with no implied obligation to your spouse—it protects the assets you already had before the marriage. A post-nup explicitly deals with your obligation to your spouse.

Post-nuptial agreements typically outline a few common aspects of your legal and financial responsibilities to each other:

Inventory and division of assets. A post-nup will typically clearly state who owns what, and how the assets will be divided in the case of divorce. This can range from property like a home to investments to a family-owned business. For example, if the couple has a shared investment portfolio but one spouse contributes 75% of the money invested in it, the post-nup could specify that the funds will be split 75-25 in case of divorce, which can spare you a lot of squabbling.

Allocation of debts and other obligations. A post-nup can also clearly define who will be responsible for debts that are currently shared within the marriage. If you took out a large loan, for example, or have a car payment or mortgage, the post-nup defines who carries that debt if the marriage is dissolved.

Alimony and support. A post-nup can also define future financial arrangements, like spousal support. For example, if one spouse stops working in order to care for children and take care of the home, the post-nup could define the earnings they sacrificed and require the other spouse to pay support. This can make a partner feel more secure in their choice to give up a career.

A post-nuptial agreement can also contain provisions for future property and financial windfalls. For example, it can specify that any property acquired by either partner after signing the post-nup will be considered their individual asset and not a shared one. You can also define how inheritances will be handled, or how large gifts will be handled. For example, if one spouse’s parents gave the couple a large monetary gift in order to purchase a house, the post-nup can define whether the other spouse should repay their share of that gift or if it should be forgiven and considered moot.

One thing you can’t put in a post-nuptial agreement is custody arrangements. Even if both partners agree on plans for children in the case of divorce, the actual decisions surrounding custody and support are almost always reserved for the court to decide based on the best interests of the child. Even if you try to codify custody and support in your post-nup, it won’t be enforceable unless a court agrees with you on every point.

How to create a post-nuptial agreement

Post-nuptial agreements can be a murky area of the law, depending on where you live. Some states have clear legal guidelines for them; other states have very little precedent. Your best bet is always to engage the services of an experienced family lawyer when crafting one to ensure it will be enforceable in your state.

Generally speaking, however, as long as the agreement satisfies some basic principles you’ll be fine. The agreemnet should be:

In writing. The agreement has to be in writing—an “understanding” or oral contract, even if affirmed by both parties, is usually not going to cut it. And both parties must sign the agreement in a legally acceptable way.

Voluntary and just. Neither partner can be pressured or compelled into signing the post-nuptial agreement. For example, if one partner threatens to leave the other penniless unless they sign an agreement that strongly favors them, that agreement is most likely unenforceable.

Similarly, the terms of the agreement must usually also be reasonable and fair. Even if both sides agree, if the courts find any provisions to be unconscionable or unjust the agreement may be rejected.

Comprehensive. Post-nuptial agreements have to fully disclose all relevant information. Hiding assets or other information can render the whole agreement unenforceable.

Like pre-nuptial agreements, post-nups don’t only apply to troubled marriages. These agreements can create a sense of security for both partners by providing clear guidelines, an inventory of assets, and other ground rules for the marriage. Plus, since these agreements remove much of the financial uncertainty surrounding divorce, they can also help couples focus more on the emotional bonds between them and the relationship, because they don’t have to worry about maneuvering financially to protect themselves.