You wake up with your stomach in major turmoil. Maybe you’re vomiting and have a fever, too. Is it a stomach bug? Food poisoning? How can you tell the difference?

Christian Weber, MD, a gastroenterologist at Boston Medical Center, says it’s important to establish the context of the condition. “You get a lot of clues from timing, environment and possible sick contacts.”

Ask yourself these questions to help plan a course of action.

Related: Is Your Poop Trying to Tell You Something?

Did you have contact with other sick people?

“This would give it away,” says Weber, who also works as associate chief and clinical director of gastroenterology at the VA Boston Healthcare System. “If you develop symptoms after contact with someone who is already sick, that’s usually an indication that it’s the acute onset of a viral disease.” In other words, you have the “stomach flu” — which is not actually a flu virus.

Noroviruses are the most common cause of acute gastroenteritis or “stomach flu” in the United States, causing as many as 21 million illnesses and 71,000 hospitalizations each year, according to the Centers for Disease Control and Prevention (CDC). The virus spreads very quickly and is very contagious. The symptoms — nausea, stomach pain, diarrhea and vomiting — develop within 12 to 48 hours of exposure as a result of an inflammation of the gastrointestinal tract. Touching contaminated surfaces, interacting with an infected person and eating contaminated food or water are all ways to catch norovirus.

According to Mayo Clinic, symptoms of a viral stomach bug usually last just a day or two but sometimes hang around for as long as 10 days.

As many as 800 people die each year from norovirus in the United States because the symptoms (diarrhea and vomiting) can cause severe dehydration, the CDC says.

“In kids, fluid loss can happen very quickly and can manifest in very severe ways,” says Weber. “The child may become unresponsive or experience a change in mental status because they don’t have the reserves to withstand relatively small losses of fluid, so fluid replacement is critical.”

Did people you shared a meal with also get sick?

If you recently shared a meal with others who also suddenly developed stomach problems, you probably have food poisoning, Weber says.

In general, symptoms are the same as those of stomach viruses — upset stomach, abdominal cramps, nausea and vomiting, diarrhea, fever and dehydration. But according to foodsafety.gov, the symptoms of food poisoning and their severity vary depending on what organism in the food made you sick. So can the symptoms durations. See this handy food poisoning chart for details.

Related: How to Avoid a Dangerous Pharmacy Mix-Up

Have you traveled recently?

“If somebody came back from a vacation from somewhere like Latin America and developed diarrheal disease, it’s most likely food poisoning or gastroenteritis,” says Weber. Many foreign countries do not filter water to the same standards as the United States, which exposes American travelers to bacteria they may not have developed an immunity to.

Related: How to Avoid Travelers’ Diarrhea

Are you anxious or stressed?

While norovirus or stomach flu-like illnesses usually pass within one to three days, ongoing stomach troubles that flare up during times of stress may have psychological causes.

“An anxiety-related case can have abdominal pain but rarely acute vomiting and diarrhea,” says Weber.

Related: 5 Times Acupuncture Can Help Cure What Ails You

What to do

If vomited or diarrhea have made you dehydrated, Weber advises oral replacement fluids for kids. “They are mainly glucose and sodium, so it’s not only liquid but also fuel for cells to keep the body in a more energetic state,” he notes. Sports drinks with electrolyte solutions are also good solutions for adults, but stay away from alcohol and anything with caffeine, which may result in more bowel movements, the CDC says.

According to the Mayo Clinic, you should go to the hospital if:

  • You haven’t been able to keep liquids down for 24 hours
  • You've been vomiting for more than two days
  • You're vomiting blood
  • You're dehydrated (signs include excessive thirst, dry mouth, deep yellow urine or little or no urine and severe weakness, dizziness or lightheadedness)
  • You see blood in your bowel movements
  • You have a fever above 104 degrees F

Related: 6 Health Myths Even Smart People Believe

Chelsea Rice is a freelance health writer living in Boston. She's written for Boston.com, The Boston Globe, HealthLeaders Media and Minority Nurse magazine.