QuestionAnal canal
How Does Your Body Know When to Poop? The Defecation Reflex
For general education about how the body works, not medical advice. Medical disclaimer.

The body knows when to pass stool because stretch receptors in the rectal wall send signals to the nervous system when stool fills the rectum. This sensation creates the urge to defecate, and a reflex relaxes the internal anal sphincter while the external sphincter stays closed until a person chooses to pass stool. The process is largely automatic, with conscious control added at the last step.
Contents
The full answer
The rectum is normally empty, but stool moves into it from the sigmoid colon in waves of movement called mass movements. These movements push a larger amount of stool into the rectum at once, and they often happen after meals because of the gastrocolic reflex, which raises colon activity after food enters the stomach. The rectum then stretches as it fills.
The rectal wall contains stretch receptors, which are nerve endings that respond to pressure and stretch. When the wall stretches enough, these receptors send signals along the pelvic nerves to the spinal cord and up to the brain. The brain interprets the signal as the urge to pass stool.
The signal also triggers a reflex in the lower body. The internal anal sphincter, a thick ring of smooth muscle at the anal canal, relaxes automatically. This is the rectoanal inhibitory reflex, and it lets the upper part of the anal canal open without any conscious decision.
The external anal sphincter and the puborectalis muscle are skeletal muscles that a person controls. They stay contracted until the person decides it is appropriate to pass stool. When the person relaxes them, the anorectal angle opens and the abdominal muscles and diaphragm push the contents out.
How the reflex works in the nervous system
The reflex is organized in the spinal cord, and the brain adds conscious control on top of it. Stretch receptors in the rectal wall send signals through pelvic nerves, which carry the information to the sacral segments of the spinal cord, mainly S2 to S4. From there, signals travel up to the brain and also return to the internal sphincter through autonomic fibers.
The enteric nervous system, a network of nerve cells within the wall of the gut, also contributes to the reflex. It controls much of the basic movement of the rectum and the internal sphincter, so the reflex can operate even when the spinal cord connections are limited. Scientists still study how these local and central pathways interact in detail.
The external anal sphincter is supplied by the inferior rectal nerve, a branch of the pudendal nerve that also carries sensation from the lower canal. The puborectalis receives motor signals from the pudendal nerve as well. This is why the lower canal can tell the difference between gas, liquid and solid stool, and why a person can clench the sphincter to delay the urge.
Sensation from the rectum is not very precise. Stretch receptors in the upper rectum signal fullness, but they do not tell the brain exactly where the stretch is. The lower canal, with its touch and temperature receptors, gives more detailed information about what is at the anal opening.
What the reflex means for the rest of the day
The reflex does not mean that stool must pass as soon as the urge appears. Because the external sphincter can stay contracted, a person can delay the response for a time. Over time, the rectum adapts to the filling and the urge can fade, which is part of normal physiology.
This flexibility depends on the balance between the reflex and voluntary control. The internal sphincter remains partly contracted at rest, and the external sphincter adds a further closing force. When the rectum is full and the person chooses to pass stool, the signals reverse: the external sphincter and puborectalis relax, and the abdominal muscles raise pressure in the abdomen.
Differences between people are normal. The number of times people pass stool each day varies widely, and the size and shape of the rectum vary as well. Anatomists describe the reflex as a range of normal function, not as a single fixed rule.
Children and toilet training
A newborn has the same basic reflex, but the nervous system does not yet control the external sphincter. Stool passes almost automatically, and the infant has no conscious way to hold it. The rectal wall and internal sphincter work together, so the reflex is already active at birth.
Voluntary control develops during early childhood. As the pathways from the brain to the spinal cord mature, a child learns to tighten and relax the external sphincter and puborectalis in response to the urge. Most children gain this control at about two to three years old, although the timing varies widely from child to child.
Toilet training is a learning process in which the child connects the sensation of the urge with the action of relaxing the external sphincter. The muscles themselves are developed, and the nervous system learns when to use them. This is a physiological process, not a skill that depends on a particular method.
Common myths
One myth is that the body senses stool by smell or taste. The sensation of the urge comes from stretch and touch receptors in the rectum and anal canal, not from the nose or mouth.
A second myth is that the urge means the rectum is full of stool. The urge can start when the rectum fills with gas or liquid as well as solid stool, because the stretch receptors respond to volume rather than to type.
A third myth is that the internal sphincter is under conscious control. The internal anal sphincter works without conscious effort, and the rectoanal inhibitory reflex relaxes it when the rectum stretches. Conscious control applies mainly to the external sphincter and the puborectalis.
Frequently asked questions
How does the body know when it needs to poop?
Stool moves into the rectum in waves of movement, and the stretch of the rectal wall sends signals to the spinal cord and brain. These signals create the urge to pass stool, while the internal anal sphincter relaxes by reflex.
What is the rectoanal inhibitory reflex?
The rectoanal inhibitory reflex is a nerve reflex in which stretching of the rectum causes the internal anal sphincter to relax. It works through the enteric and autonomic nervous systems without conscious input.
Can a person control when they pass stool?
Yes, a person can control the external anal sphincter and the puborectalis muscle. These skeletal muscles can keep the canal closed for a time, but the reflex still drives the urge to pass stool.
When do children learn to control defecation?
Newborns pass stool by reflex and have no voluntary control. Most children gain control of the external anal sphincter at about two to three years old, though the timing varies from child to child.
Does the body have one sensor or many for stool?
The body uses several sensors, including stretch receptors in the rectal wall and touch and temperature receptors in the lower anal canal. Together they tell the nervous system whether the contents are gas, liquid or solid.
Why does the urge often come after eating?
Eating triggers the gastrocolic reflex, in which the stomach stretch and nerve signals increase movement in the colon. This moves stool toward the rectum, which can produce the urge to pass stool soon after a meal.
Sources and further reading
- Standring, Susan (ed.), Gray's Anatomy: The Anatomical Basis of Clinical Practice
- OpenStax, "Anatomy and Physiology 2e"
- Moore, Keith L., and Arthur F. Dalley, "Clinically Oriented Anatomy"
Cite this page
“How Does Your Body Know When to Poop? The Defecation Reflex.” Body Atlas, https://body.bigworldlist.com/questions/how-does-your-body-know-when-to-poop/.