Most of the time, constipation in school-age kids is due to a diet that doesn't include enough water and dietary fiber, which both help the bowels move properly. Kids who eat a typical fast-food diet — rich in fats (burgers, fries, milkshakes) and processed sugars (candy, cookies, sugary soft drinks) — may find that they're constipated more often.
Sometimes, medications like antidepressants and medications used to treat iron deficiencies can lead to constipation. In babies, constipation can occur as they transition from breast milk to baby formula, or from baby food to solid food.
Keep in mind that some kids tend to avoid going to the bathroom, even when they really have the urge to go. They might ignore internal urges because they don't want to stop playing a fun game, use a restroom away from home, or have to ask an adult to be excused to go to the bathroom. When they ignore the urge to go, it's harder to go later on.
Stress can also lead to constipation. Kids can get constipated when they're anxious about something, like starting at a new school or problems at home. Research has shown that emotional upsets can affect how well the gut functions and can cause constipation, as well as other conditions, like diarrhea.
Some kids get constipated because of a condition called irritable bowel syndrome (IBS), which can occur when they're stressed or eat certain trigger foods, which often are fatty or spicy. A child with IBS may have either constipation or diarrhea, as well as stomach pain and gas.
In rare cases, constipation is a sign of other medical illnesses, so keep your doctor informed if your child continues to have problems, or if the constipation lasts for 2 to 3 weeks