When Amanda Chatel’s husband cheated on her after a year and a half into their marriage, she was flabbergasted. “I think cheating is one of the worst things you can do to a person,” said Chatel, who coped with the shock by throwing herself a lavish divorce party at The Plaza two years ago when she was 35.

She also never anticipated it. She explained that, “I was in my early 30s when I got married, so any interest I would have had to hook up was gone.

“There wasn’t a single ounce of my being that would have even considered cheating.”

Chatel’s attitude is in keeping with a younger generation that seems to view adultery as more cataclysmic than their predecessors.

A new study from the Institute for Family Studies claims 20 percent of those older than 55 years old reported having sex outside of marriage. That’s compared with only 14 percent of those under 55. (The study constitutes infidelity as having sex with anyone but your husband and wife.)

Millennials, generally defined as those born between 1981 and 1997, take a particularly dim view of cheating. While Generation X, born between 1964 and 1981, report a 17 percent extramarital-sex rate, those aged 37 and under claim a rate of 12 percent, according to the study.

Why are millennials so faithful? Could it be that we are all beautiful, pure-hearted people? Maybe, but it’s likely there are other factors at play.

For one thing, millennials are less sexually adventurous than their predecessors.

A 2015 study by Jean Twenge that ran in Archives of Sexual Behavior noted that baby boomers (those born between 1946 and 1964) averaged an estimated 11 sexual partners throughout adulthood, while millennials averaged just eight.

Perhaps today’s youth isn’t as hot to trot as the over-55 free-love crowd was in their day.

Baby boomers came of age during the “Summer of Love” in 1967, when people were encouraged to “make love not war.”

Mate swapping was a fad in the ’70s. Meanwhile, millennials grew up watching the president get impeached for receiving extramarital oral sex. We learned early on that there might be some pretty bad consequences to adultery.

Plus, when you’re surrounded by devices like Tinder ensuring that a hookup is just a swipe away, a fling may seem less exciting than when you had to go to a bar with the mere hope of meeting someone.

Moreover many younger people, like Chatel, marry later.

Many people today get married because they want to — not because they should.

According to a Pew Research Center study “Millennials in Adulthood,” 26 percent of millennials are married, while 48 percent of baby boomers were married when they were millennials’ age. (Which makes it really impressive that they managed to rack up those 11 partners so quickly).

Being a bit older may help millennials make smarter choices about whether marriage — and the person they’re marrying — is right for them.

Christopher Shelley, a New York-based wedding officiant notes that most of the couples he sees are in their early 30s, with the youngest this year being 23.

He says that, in general, “the older couples I’ve married are exquisitely bonded to each other in a way these young couples aren’t. Older couples have better stories, and if you could do a comparison of blood-pressure levels of older couples versus younger couples at the actual ceremony, medical experts would be shocked at how much calmer the older couples are.”

And if those couples didn’t want to commit for life, they’d probably just be single.

Andrea Syrtash, author of the book “Cheat On Your Husband (With Your Husband): How to Date Your Spouse,” claims that, “for the most part, there’s no longer a stigma associated with being 30 and single or living with someone without being married to him or her.”

“Many people today get married because they want to — not because they ‘should.’ ” Syrtash adds. “This is a big paradigm shift and very different from people who married decades ago.”

Meanwhile, other factors — like social media — are being introduced late into the lives of baby boomers, which can make them curious about extramarital options.

According to Pew Research, 8.6 million baby boomers joined Facebook between July 2015 and December 2016.

Maria Avgitidis, founder of Agape Matchmaking, explains that as a result, “people over 55 suddenly have a bigger network. They’re seeing people they haven’t seen in 20 years and want to play now.”

After 30 years of marriage, your high-school boyfriend might suddenly seem like a good option again.

But then, it might be easier to refrain from cheating at the start of a marriage. Thirty years down the road, millennials may find themselves in a very different mind-set.

After all, who knows what kind of sexy virtual reality they’ll have developed by then?

It might be enough to get us up to 11 partners.