Has a couple ever made as much money after an affair as Jay-Z and Beyoncé?

The couple surprised fans Saturday with the release of their first joint album, “Everything Is Love,” and the new music is another example of how the duo has made a cottage industry out of marital strife. The record was released first on the streaming service Tidal and was available on Spotify SPOT, +0.69% , Apple AAPL, +1.57% Music and Amazon AMZN, +5.69% Music as of Monday.

The album ends with Beyoncé singing, “You did some things to me/Boy you do some things to me/But love is deeper than your pain/And I believe you can change,” in the last track, Lovehappy, the New York Post reported. “Sometimes I thought we’d never see the light.”

The lyrics seem to refer to cheating by her husband, rapper Shawn “Jay-Z” Carter, who publicly admitted to infidelity in a 2017 interview with New York Times executive editor Dean Baquet. But for the couple’s fans — particularly members of Beyoncé’s “Beyhive” — such an admission was a foregone conclusion because they each had already released songs about it.

Jay-Z’s transgressions reportedly inspired many of the songs on Beyoncé’s most recent album, “Lemonade.” It sold 2.5 million copies globally in 2016, according to the International Federation of the Phonographic Industry (IFPI). The new music also prompted Beyoncé’s Formation tour, which grossed $256 million, helping to push her net worth to an estimated $350 million, according to Forbes.

See also:The SEC wants to force Jay-Z to testify after apparel deal soured

Meanwhile, Jay-Z parlayed the experience into his latest album, “4:44,” which became his 14th album to debut at No. 1 on the Billboard 200 chart and garnered several Grammy nominations. Both his album and Beyoncé’s also sparked renewed interest in Tidal, the music streaming service he co-owns. All told, the duo was the highest-paid celebrity couple as of last July, per Forbes.

When it comes to loyalty in marriage, there’s a big opportunity cost to consider: Marriages, themselves, are an investment. Aside from the thousands of dollars a couple may have spent on a wedding, nurturing the relationship at the core of a marriage typically involves a great deal of time and money. Engaging in an extramarital affair is like throwing that investment away. “It’s a waste of money if you’re not willing to make your partner the priority in your life,” said Tom Gagliano, author of “The Problem Was Me” and life coach.

Also see: When a woman or person of color becomes CEO, white men have a strange reaction

The Moneyist: When your partner wants to live with you for free

The multi-platinum superstar couple found a way to benefit financially from the surely emotionally fraught marital challenges. But for most couples, it’s more likely that being unfaithful will cost money.

MarketWatch has counted the ways:

Conducting an affair is costly...

The average affair costs around $2,664, or $444 per month, according to a survey by discount code site VoucherCloud. All those hotel rooms, travel, dinners and gifts add up. But the most costly expense related to infidelity stems from divorce. Indeed, infidelity is the most common reason divorcees choose to end a marriage, providing the basis for 37% of divorces, according to a 2014 report from the Austin Institute for the Study of Family and Culture, a conservative think-tank.

...as is hiring a lawyer and filing for divorce

The average divorce’s price tag is $15,000 in legal fees, according to legal information site Nolo.com. “Divorce is like going through a terrible recession,” said Sterling Neblett, a certified financial planner and founding partner of Centurion Wealth Management in McLean, Va. “Often couples must split their assets in half which feels like losing 50% of your wealth.”

The unfaithful spouse may draw the short straw on alimony

But those costs can easily skyrocket when one partner has been unfaithful. An unfaithful spouse could lose out on receiving alimony. Alternatively, an unfaithful husband or wife might also be ordered to pay alimony and child support, depending on the duration of the marriage,the difference in income and where state law falls regarding “no-fault divorces.”

Brace yourself for a single-supplement after marriage

Call it the single supplement. Divorces have myriad financial implications beyond legal fees and the cost of buying and maintaining a home. The cheating spouse could be forced to repay their spouse the money they spent on their affair if it came from joint resources, said Suzanne Griffths, a Colorado-based lawyer. A spouse who wasn’t working prior to a divorce may suddenly may have to pay health insurance and retrain to find a job. All told, one in five women face poverty after divorce.

Don’t miss:Why so many women still take their husband’s last name

Children make divorce far more complex and costly

Research has shown that children in single-parent households are far more likely to grow up in poverty and have lower educational attainment and less likely to be upwardly mobile in terms of income. “There are generational costs,” said Bruce Elmslie, an economics professor at the University of New Hampshire. Divorce, he said, “is very detrimental to their economic outcome.” (There are many exceptions, of course, including former U.S. president Barack Obama.)

Deciding to work on a marriage costs money too...

If you want to work it out like Jay-Z and Beyoncé? Couples counselling can cost up to $300 per hour. “It takes a great deal of time for the person who did the betraying to show the other person that they are the priority,” Gagliano said. The couple may also need to shell out money on testing for sexually-transmitted infections. They can cost up to $190. Plus, the stress involved with infidelity can hamper one’s productivity at work, leaving them vulnerable to earning less or losing their job.