The duration of pain depends on the underlying cause. For example, if the pain is due to viral or bacterial infection, it shouldn’t last for more than two days (34). However, to be on the safe side, take your baby to the doctor if they look uncomfortable or if the pain exceeds for more than two days.