In a long awaited decision the United States Supreme Court struck down the 1996 Defense of Marriage Act (DOMA) on Wednesday, deeming it unconstitutional to deny federal benefits to married same-sex couples. If they live in a state that recognizes their marriage, they will be eligible for the same benefits afforded to heterosexual couples, including Social Security survivor’s benefits and non-taxable inheritances after a spouse’s death.

Same-sex marriage is still not legal on the federal level in the US as it is in Canada, Argentina, France, Spain, South Africa and Sweden, among other countries. But in 13 states (including California, where a second Supreme Court decision also issued Wednesday allowed same-sex marriages to resume) and the District of Columbia, same-sex couples can legally marry. Until the court decision, they enjoyed few of the rights of heterosexual married couples. 

“It has the potential to have a really significant impact,” said Rose Greene, a financial planner in Santa Monica, California, who counts many gay couples among her clientele. “There are roughly 1,000 distinctions in federal law where same-sex couples have been unable to have the benefit of those rules, and that's going to be wiped out.”

The relative benefits or penalty will depend on the couple, their incomes, and the state they live in, Greene said. In other words, same-sex couples have a lot to celebrate, but the financial implications of the ruling could be a mixed bag, particularly when it comes to taxes. Here’s a look at what comes next, financially, for same-sex married couples:

File taxes as “married filing jointly”. Previously, even in states that recognized same-sex marriage, couples could file taxes jointly at the state level, but they had to file separate returns federally. That will no longer be true. Now the benefit or penalty associated with that change will depend on a couple’s incomes.

For instance, a household in which both partners earn high incomes might pay more in taxes filing together if their combined pay checks push them into a higher tax bracket. Conversely, a household in which one spouse earns much more than the other — or is the primary breadwinner — will likely see a lower tax bill.

“If a couple has a joint income of $100,000, and one of them earns $70,000 and the other earns $30,000, they’ll save about $1,625 in taxes” per year, Greene said. “If one spouse earns the entire $100,000 and the other has no income, the savings could be in excess of $7,700.”

Inherit without tax penalty. Heterosexual married couples have long enjoyed the privilege of passing retirement assets and property to a spouse upon their death, tax free. Part of the case the Supreme Court reviewed hinged on this issue, with the plaintiff arguing she should not have had to pay more than $360,000 in estate taxes after her same-sex spouse died. 

Now same-sex couples can enjoy the same benefit of this particular tax free inheritance, potentially saving them thousands, if not hundreds of thousands of dollars. This includes receiving inherited IRA and 401(k) retirement savings accounts, tax free.

Collect spousal Social Security benefits. “Right now, in same-sex couples, if one of the couple dies, the other one cannot access that person’s Social Security benefits," Greene said. These benefits — paid out to retired US citizens who are at least age 62 who have worked over their lifetime and paid taxes into the scheme — have been available to heterosexual married couples.

Considering that for many couples in the US, one spouse earns more than the other, and that most Americans count on Social Security as an income stream in retirement, this is a significant benefit change. Even in the event of divorce, an ex-spouse is eligible to collect a spousal benefit from Social Security as long as the marriage lasted 10 years.

Receive health insurance benefits from a spouse, tax free. In states that allowed employees to put a same-sex spouse on a company or government health insurance plan, the monetary benefits to the spouse were considered taxable income.

“It’s been very expensive for same-sex couples to keep their spouses on health insurance,” said Deb Kinney, an estate planning and tax attorney in Santa Rosa, California. But that is now going to change.

Escape the gift tax. “Let’s say someone adds their same-sex spouse to the deed of a house,” offered Chris Long, a financial planner in Chicago. “Under DOMA, that was considered a gift.” The gifter would have to file a gift tax return and it would be taken off the amount that could be inherited tax free from his or her estate, Long explained. Any amount over $13,000 would be considered a gift. Heterosexual spouses have been able to give unlimited gifts to each other, tax free. Same-sex spouses will soon enjoy the same benefit.

Get tax deductions for co-adopting a child. Not all states currently allow same-sex spouses to adopt a child together, but that is also going to change with the end of DOMA. Co-adoption enables both parents to make decisions regarding the child’s welfare and to be recognized as a legal parent of the child. The financial advantage is to be “eligible for greater deductions for that child”, said Greene. 

Be eligible for a partner’s retirement plan. In pension plans that include a spousal benefit, a same-sex spouse will now be able to receive that retirement savings after the pensioner spouse dies.

Overall, the Supreme Court’s decision this week will impact same-sex couples in many ways at the federal level as they gain access to the programs heterosexual couples have used for years and new benefits in the future. “For the people who are most vulnerable”, said Kinney, “that’s really important.”