Cranky pregnant moms, prepare for vindication.

Researchers studying the limits of human endurance have determined that the physical intensity of pregnancy is basically like running a 40-week marathon.

“Pregnancy is the most energetically expensive activity the human body can maintain for nine months,” Duke University evolutionary anthropology professor Herman Pontzer, who co-authored the study, tells The Post.

The report, published in June’s edition of Science Advances, analyzed elite athletes from some of the most demanding races in the world, such as Ironman, the Tour de France and the 3,000-mile Race Across the USA, in which runners complete six marathons a week for four months.

Researchers looked at basal metabolic rates, or how many calories you need in order to function when your body is at rest. The most anyone can sustain, according to the study, is burning calories at 2.5 times the person’s BMR, or about 4,000 calories a day for the average adult.

Pregnant women operate at 2.2 times their BMR — almost the maximum possible, every day, for some 270 days, researchers found. A rate much higher than that and pregnancy would be unsustainable, damaging to the body and potentially deadly.

“I don’t think any mother is surprised to learn how difficult pregnancy is!,” Pontzer says. “But I’ve had a few friends — including my wife — tell me it was good to see pregnancy recognized as extremely challenging.”

Marathoners’ energy use peaks at around 15.6 times their BMR, but maintain the exceedingly high rate for only a short period of time, the study revealed. By contrast, Tour de France cyclists move at 4.9 times their resting rate during the 23-day race, and Antarctic trekkers who heave 500-pound sleds across the grueling, snow-covered terrain for 95 days go at 3.5 times their BMR.

“Pregnancy of course is very long compared to other sporting events, but pregnant and lactating women seem to be working close to the boundary for their duration,” study co-author John Speakman, professor of biology at the UK’s University of Aberdeen, tells The Post.

“The limit seems to be imposed by the speed at which the [digestive tract] can process the food that we eat,” he adds. “So simply piling more food in at the mouth — [such as] protein bars — isn’t going to speed that process up further down the gut.”

Humans simply cannot properly process enough calories to sustain an energy use higher than the 2.5 ceiling. More than that and our bodies would begin eating away at their own tissue.

“There’s just a limit to how many calories our guts can effectively absorb per day,” Pontzer says.

So, pregnant people of the world, next time you feel guilty about backsliding on prenatal yoga or sending your partner out for that gallon of ice cream, remember that having this baby will be the greatest race of your life — and you deserve a prize.