The U.S. Supreme Court just legalized gay marriage nationwide. If same-sex couples get married, they gain access to hundreds of legal and financial benefits.

They—and anybody else thinking about marrying—also bear some often-overlooked costs and responsibilities.

Even couples who have been together for decades may be surprised by how a legal marriage changes their relationship. In the eyes of the law, couples who marry go from two independent people to one economic unit.

“You’re telling the government: I will take care of this person legally and financially if something happens to them,” said Debra Neiman, a financial planner in Arlington, Mass. She saw many clients rush to the altar when Massachusetts became the first state to recognize same-sex marriage, 11 years ago, and it didn’t always work out.

“Just because you have the right to marry doesn’t mean you should,” Neiman said. “For people who are used to being financially independent and unencumbered, it may be hard.” 

Still, the legal and financial perks of marriage tend to outweigh its costs and hassles. And the biggest practical benefits of marriage come when they’re needed most—when a spouse is sick or dies. How do you weigh the cost of higher income taxes each year—a possibility for many two-income couples if they get married—against the right of a widow to stay in her house or decide where her wife is buried? 

So, coldly ignoring the whole happiness thing, here are some of the practical pros and cons of marriage.

Pro: retirement benefits

Married people can share each other’s retirement funds and Social Security benefits in a way that makes planning a lot easier. If one spouse dies, the remaining spouse can inherit pension payments or Social Security survivor benefits. When you're married, it’s far easier to roll over a spouse’s individual retirement accounts or 401(k)s into your accounts after he or she dies. Marriage lets you deploy some complicated techniques to boost your Social Security payments—for example, by accessing one spouse’s benefit early but not tapping the other until he or she is eligible for the maximum payout at age 70. 

Pro and Con: income taxes