Vomiting is your body’s way of ejecting something it perceives as harmful, and the most common reason is something you ate or a virus you picked up in the last day or two. But vomiting can also be triggered by migraines, motion sickness, medications, pregnancy, concussions, stress, or dozens of other causes that have nothing to do with your stomach. Figuring out why you vomited usually comes down to a few key details: how quickly it came on, what else you’re feeling, and what you were doing in the hours before.
How Your Body Triggers Vomiting
Your brain has a dedicated detection zone on the floor of its fourth ventricle that constantly monitors your blood for toxins, drugs, and other chemical threats. When this zone detects something wrong, it sends a signal to a nearby nerve cluster that coordinates the physical act of vomiting: your diaphragm contracts, your abdominal muscles squeeze, and the contents of your stomach are forced upward.
This system can be activated from several different directions. Your gut can send distress signals up through nerve pathways when it’s irritated or infected. Your inner ear can trigger vomiting when it detects motion that doesn’t match what your eyes see. Higher brain areas involved in emotion and memory can set it off too, which is why intense anxiety, disgusting smells, or even a traumatic memory can make you throw up. The same chemical messenger (serotonin) that plays a role in mood also lines your digestive tract and helps regulate the vomiting reflex, which is one reason nausea and emotional distress are so closely linked.
Food Poisoning vs. a Stomach Virus
These are the two most common reasons for sudden vomiting, and the timeline is the easiest way to tell them apart.
Food poisoning hits fast. Symptoms typically appear two to six hours after eating contaminated food, though some toxins produced by bacteria can cause vomiting in as little as 30 minutes. The illness tends to be intense but brief, often resolving within a day. If you can trace your symptoms back to a specific meal, especially one that tasted or smelled off, food poisoning is the likely culprit.
A stomach virus (viral gastroenteritis) has a longer incubation period, usually 24 to 48 hours after exposure. It tends to last about two days, sometimes longer, and is more likely to come with fever and chills alongside the vomiting and diarrhea. If other people in your household or workplace are sick with similar symptoms, a virus is the probable cause.
The specific pathogen matters for timeline. Staphylococcus toxins in food cause symptoms within two to four hours. Salmonella typically takes 6 to 48 hours. Certain strains of E. coli can take three to four days to produce symptoms. If you vomited and are trying to figure out which meal caused it, count backward from the onset using these windows.
Causes That Have Nothing to Do With Food
Migraines are one of the most underrecognized causes of vomiting. During a migraine attack, activation of pain pathways in the brain stimulates the same nerve cluster that controls vomiting. If your episode came with a severe headache, sensitivity to light or sound, or visual disturbances, a migraine is a strong possibility. Migraines also slow stomach emptying, which compounds the nausea.
Other non-stomach causes include:
- Motion sickness: triggered when your inner ear senses movement that your eyes don’t confirm, common in cars, boats, and VR headsets
- Medications: antibiotics, painkillers (especially opioids), and chemotherapy drugs are frequent offenders
- Pregnancy: morning sickness affects up to 80% of pregnant people, most often between weeks 6 and 12
- Concussion or head injury: vomiting after hitting your head is a red flag that needs medical evaluation
- Alcohol: both acute intoxication and the morning-after hangover trigger the brain’s toxin-detection system
- Anxiety or panic: the stress response activates the same nerve pathways that control nausea and vomiting
A less common but important condition is gastroparesis, where the stomach empties too slowly. It’s most often linked to diabetes or prior surgery and causes nausea, vomiting, bloating, and feeling full after just a few bites. It predominantly affects women and can be persistent or episodic.
What the Color of Your Vomit Tells You
Clear or white vomit usually means your stomach was already empty, and you’re bringing up water or mucus. This is common after repeated vomiting episodes and isn’t alarming on its own.
Yellow or green vomit contains bile, the digestive fluid your liver produces to break down fats. A single episode of green vomit is normal, especially if you’ve been throwing up on an empty stomach. Repeated bile vomiting with abdominal pain could point to bile reflux, an infection, or an intestinal blockage.
Brown vomit that looks like coffee grounds is a medical emergency. It typically means there’s bleeding somewhere in your upper digestive tract, and the blood has been partially digested by stomach acid. Red vomit (assuming you haven’t eaten red foods) means you’re throwing up fresh blood, which is also an emergency requiring immediate care. Both can result from ulcers or tears in the esophagus or stomach lining.
Signs You Need Emergency Care
Most vomiting episodes resolve on their own within 24 hours. But certain combinations of symptoms signal something more serious. Call emergency services if vomiting comes with chest pain, severe abdominal cramping, confusion, blurred vision, high fever with a stiff neck, or fecal material in the vomit.
Get to an urgent care or emergency room if your vomit contains blood, looks like coffee grounds, or is bright green, or if vomiting is paired with a severe headache unlike any you’ve had before. Dehydration is the other major concern: watch for excessive thirst, dark urine, dry mouth, urinating much less than usual, and dizziness when you stand up. Mild dehydration shows up as dry lips and mouth. Moderate dehydration causes delayed skin elasticity (if you pinch the skin on the back of your hand, it stays tented briefly). Severe dehydration produces very little urine and significant weakness.
When Vomiting Keeps Coming Back
If you experience repeated vomiting episodes separated by weeks or months of feeling completely fine, you may have cyclic vomiting syndrome. This condition causes stereotypical bouts of intense vomiting lasting hours to days, followed by symptom-free stretches. A diagnosis requires at least two distinct episodes, and the condition shares triggers and brain circuitry with migraines. Stress is the most common trigger, with dietary factors playing a smaller role. People with cyclic vomiting syndrome often have a personal or family history of migraines.
What to Eat and Drink After Vomiting
Your first priority is replacing lost fluid. Take small sips of water or an oral rehydration solution rather than gulping large amounts, which can trigger another round of vomiting. Wait at least 15 to 30 minutes after your last episode before trying liquids.
The traditional advice to stick to bananas, rice, applesauce, and toast (the BRAT diet) is fine for the first day or two, but there’s no research showing it works better than simply eating bland, easy-to-digest foods. Brothy soups, oatmeal, boiled potatoes, crackers, and plain dry cereal are equally good choices. Once your stomach settles, add foods with more nutritional value: cooked squash, carrots, sweet potatoes, avocado, skinless chicken, fish, and eggs. These are still gentle on the stomach but provide the protein and nutrients your body needs to recover. Avoid dairy, fried foods, spicy meals, caffeine, and alcohol until you’ve been symptom-free for at least a day.