When you're cooped up in the bathroom, liquid erupting from both ends of your body-maybe even at the same time-you might miserably wondering whether food poisoning or the stomach flu is to blame. These illnesses can both cause symptoms like vomiting, diarrhea, and the urge to douse your toilet in bleach. Still, they're not necessarily the same thing, and you probably do not want to swear off your favorite pad thai place if it's totally innocent in the whole matter. Here's what to know about food poisoning, the stomach flu, and how can you try to tell the difference.

Food poisoning can have a ton of different causes, because nothing is sacred.

Having food poisoning (also known as foodborne illness) means your body is rebelling against viruses, bacteria, or other harmful substances in you ate, Benjamin Chapman, Ph.D., an assistant professor and North Carolina State University, tells SELF. These pathogens can lurk in a wide variety of foods.

On the viral side, you have culprits like norovirus, which is the most common cause of foodborne illness in the U.S. and which typically hangs out in items like raw, ready-to-eat produce, shellfish, and contaminated water. Rotavirus, which usually affects children, is another common source. On the bacterial side, you have salmonella, listeria, shigella, campylobacter, E. coli, and more, according to the Mayo Clinic. These can show up in everything from hot dogs, milk, egg yolks, alfalfa sprouts, meat, poultry, and beyond.

Food contamination can occur at any point, whether it's through soil as it's grown, in a storage facility , or on your way. You may also get food poisoning if you are with one of these illnesses-causing microorganisms in their system handles your food or utensils.

No matter the cause, food poisoning can cause symptoms like nausea, vomiting, watery or bloody diarrhea, abdominal pain or cramping, and a fever, according to the Mayo Clinic. Lovely.

The stomach flu can not be of the type of food poisoning, ~ "Regular" flu

First, it’s important to know that the stomach flu has no relation to the “regular” flu, aka influenza. Influenza is a highly contagious viral infection that causes fever, muscle aches, fatigue, and respiratory issues. In severe cases, influenza can be life-threatening (seriously, get your flu shot if you have not already) .

The stomach flu, on the other hand, is what's known as viral gastroenteritis, and it happens when a virus causes an infection in your gut. Norovirus is one of the most common causes, leading to between 19 and 21 million viral gastroenteritis infections each year, per the CDC.

Just like with food poisoning, the stomach flu can cause vomiting, diarrhea, nausea, abdominal pain, muscle aches or headache, and a fever, according to the Mayo Clinic. You can pick up viruses that cause the stomach flu by touching a surface that touches or has direct contact with them. You can also get it through the food, though, which brings us to the trippiest part of this entire conversation ...

You can technically have food poisoning and the stomach flu at the same time.

Let's say you pick up a case of viral gastroenteritis after a dinner of norovirus-contaminated scallops. That basically means you got the stomach flu from a food-based source. "Is it food poisoning or the stomach flu?" There's not really a clear line you can draw, "Amesh A. Adalja, MD, a board-certified infectious disease, physician and affiliated scholar at the Johns Hopkins Center for Health Security, tells SELF.

Still, there are a couple of ways you can be able to tell which one you have.

If knowing exactly what you're battling helps you better gather the wherewithal to fight it (understandable), you can play detective. Here are a few things to consider:

When did the symptoms set in and how long are they lasting? The stomach flu typically shows up within one to three days after you've been exposed, and it usually only lasts a day or two, according to the Mayo Clinic. After that, you should start to feel like yourself again. Adalja says. If you're dealing with symptoms for a shorter or longer than a day or two, you may have food poisoning. While norovirus is a common cause of both food poisoning and the stomach flu, so many bacteria can potentially cause the former. Symptoms of food poisoning can pick up just a few hours after contamination, or even days or weeks later, according to the Mayo Clinic.

What kind of diarrhea situation are you dealing with? If you have diarrhea and can stomach looking into the toilet bowl, take a peek. It's like the poop version of reading tea leaves: If you see blood in your diarrhea, it could be a sign of food poisoning. Bloody diarrhea is more likely to be a symptom of some types of food poisoning because of some bacteria, like shigella, can cause inflammatory changes in the intestines and lead to bleeding, but viruses are less likely to do so. Adalja explains. (If you do see blood in your poop, you should let your doctor know.)

Are you projectile vomiting like that girl from The Exorcist? According to the experts, norovirus seems more likely to cause projectile vomiting and stomach cramps in their patients than most other pathogens that cause food poisoning or the stomach flu. "The precise mechanism behind norovirus-induced [projectile vomiting] and stomach cramps is unknown but is likely to occur between the virus and the immune system," Dr. Adalja says.

Basic treatment for food poisoning and the stomach flu is the same, but if you have a serious case of either, you might need to see a doctor.

Regardless of whether you have food poisoning or the stomach flu, the most important thing is to try to keep yourself hydrated, Dr. Adalja says. The vomiting, diarrhea, and inability to eat or drink much can dehydrate you. While water is great, an electrolyte solution like Pedialyte can help replace nutrients and electrolytes you've lost, so it's not a bad option if you can handle it. Adalja says.

These illnesses typically pass with a lot of suffering but minimal complications. However, there are some signs that you need medical attention, according to the Mayo Clinic:

  • You've been vomiting frequently and unable to keep liquids down for over 24 hours
  • You see blood in your vomit or poop
  • You have severe abdominal pain
  • You have diarrhea for three or more days
  • You experience signs of dehydration like excessive thirst, dry mouth, dizziness, and dark yellow pee
  • You have a fever
  • You experience any neurological issues like blurry vision, muscle weakness, or tingling in your arms (campylobacter, a common cause of food poisoning, is also a common risk factor for the autoimmune disease Guillain-Barré syndrome, which affects the neurological system by damaging nerves.)

Your doctor can do a stool sample to figure out what's happening and treat you from there, Chapman says. Depending on what you are dealing with, the treatment might range from antibiotics to anti-nausea medications to replacing lost fluids via IV.

Once you're done puking your brains out, you'll probably want to avoid the experience again. Here's how.

Being on top of your hygiene is the first step, whether you're trying to avoid food poisoning or the stomach flu. That means washing your hands well, especially around food, and if you have kids, making sure they're washing their hands well, too.

If you know someone with the stomach flu or if someone in your home has it The Mayo Clinic recommends disinfecting surfaces as often as possible and avoiding sharing things like utensils. You can also make sure your kids are vaccinated against rotavirus, which most commonly causes the stomach flu in children.

When it comes to avoiding food poisoning, you'll want to make sure to keep your food raw and ready-to-eat foods separately, cook foods to the recommended temperatures, refrigerate or freeze food, avoiding food at room temperature, and throwing out any food that you're not sure about. (You can check out FoodSafety.gov for more guidance.)

Yes, it hurts to toss out that delicious sandwich you forgot to pop in the fridge. But getting food poisoning or the stomach flu hurts a whole lot more.

Related: