An elephant's rectum is about 10 times longer than a cat's, yet they poop in the same amount of time. This conundrum may not have stumped you—or even occurred to you—but it vexed researchers at Georgia Tech. "How do animals defecate at a constant duration?," they quite literally asked in their paper—which by the way was published in the journal Soft Matter. "To answer this question, we begin with measurements of feces."
So let's begin.
As with every good scientific endeavor, they started by defining their variables. Defecation begins, for example, at t=0, which they say is "when the tip of feces appears." They provided four separate videos just in case you weren't sure exactly when that is. And to avoid confusion between "steady state" pooping, which is what humans do, and animals like rabbits that produce little pellets they restricted their study to cylindrical feces. Repeat: you will not learn anything about the pelleted feces of a rabbit in this article.
Based on their exhaustive measures of every possible aspect of pooping, the researchers boiled their findings down into one cohesive mathematical model of defecation. It contains seven variables and a fractional exponent, but here's the gist of it: the time it takes to poop is equal to said poop's length divided by its velocity. Bigger animals may make bigger turds, but they also exert a greater force upon those turds and have more mucus to help them slide along down the alimentary chute that is the rectum. Gravity, in case you were wondering, was discounted from the equation because most mammals have horizontal recta (yes, that's an acceptable plural of rectum).
The researchers did acknowledge that in the case of diarrhea, the human gastrointestinal tract may not even need to exert pressure and instead could allow gravity to take its course. The equation for the duration of diarrhea involves slightly different variables, since it "occurs so quickly that steady state is not reached." They estimated that a 70 kg (or about 154 lbs) human would be done in about 0.5 seconds. Accounting for constipation, on the other hand, means eliminating the effects of mucus, which they assume to have been absorbed in the event of an intestinalbackup. With zero mucus and the "stiffest feces," they approximate a six hour travel time when applying maximum rectal pressure, though they note that since intestinal walls can deform to help the poo along that actual transit time is likely to be shorter.
I pulled a few choice bits, but it's really a fascinating read.
https://www.popsci.com/everyone-poops