Got a symptom but not sure what's causing it? Use our award-winning symptom checker to find out – it's free!

×
27th June, 202110 min read

Why do I have a headache and fever?

Medical reviewer:Dr Ann Nainan
Author:Dr Adiele Hoffman
Last reviewed: 09/06/2021
Medically reviewed

All of Healthily's articles undergo medical safety checks to verify that the information is medically safe. View more details in our safety page, or read our editorial policy.

What does it mean if you have a headache and temperature at the same time?

A headache is pain in any part of your head, including your scalp, upper neck and face. It may last for just a few minutes or continue for many hours. When you have a fever, your body temperature is high – usually 38C or more – which can make you feel hot, cold, shivery or sweaty.

There are many reasons why you may have a headache and high temperature at the same time, including a common viral infection like a cold or the flu. Both symptoms are usually easily treated: they may go away on their own or when you treat the cause with medication and by resting, for example.

But sometimes, having a bad headache and a fever may mean you have a more serious condition that needs medical attention or even emergency treatment.

Common causes of a headache and a fever

You may have a headache and a high temperature because you have mild infections like a cold or the flu, or a more serious infection, like meningitis. Other infections that may cause both symptoms include those spread by mosquitoes in tropical areas, such as malaria or dengue fever.

Sometimes, the cause may not be an infection. Instead, it may be due to something like heat exhaustion or a side effect of a medication. Here are some of the main causes of a headache and fever.

Respiratory tract infections

Your headache and fever might be due to a respiratory tract infection in your airways, sinuses, throat, nose or ears. These infections are usually caused by a virus, like the flu is, but can occasionally be caused by bacteria.

Other symptoms you may have along with a headache and fever may include:

  • muscle aches
  • a cough
  • a runny or blocked nose
  • sneezing
  • feeling generally unwell

If the infection is in your sinuses and causes sinusitis, you might also have pain, redness or swelling around your cheeks, eyes or forehead.

Heat exhaustion and heatstroke

Heat exhaustion and heatstroke usually happen during very hot weather or when you do very hard exercise. Heat exhaustion is when you become very hot and lose water or salt from your body, while heatstroke is when your body isn’t able to cool itself down and your temperature becomes dangerously high.

Other than causing a headache and a high temperature, these 2 conditions could cause symptoms like sweating a lot, feeling dizzy, muscle cramps, feeling very thirsty and fast breathing or a fast heart rate.

You’re more at risk of heatstroke if you’re very young or old, or if you have a long-term health condition like diabetes or heart disease.

Medication or vaccination side effects

Many medicines can cause side effects. Some medications – such as antibiotics or medicine for epilepsy – commonly cause a headache, and it’s also possible that they may trigger an allergic reaction that causes a fever. Sometimes this reaction can be serious, so see a doctor if you think you’re having an allergic reaction or any other worrying side effects.

Sometimes a vaccine can cause side effects – for example, the COVID-19 vaccine can cause a headache and a high temperature, as well as other side effects. Read more about the possible side effects of the COVID-19 vaccine.

Encephalitis

Encephalitis – inflammation of your brain – can start off with flu-like symptoms that may develop over hours, days or weeks. These include a headache and a high temperature, but more serious symptoms can include fits (seizures), difficulty speaking and fainting.

The most common cause is the virus that causes cold sores, but it can be caused by other viruses.

Encephalitis is rare, but it can be life-threatening, so go to a hospital or call an ambulance immediately if you think you have it.

Meningitis

Meningitis is a serious infection of the lining around your brain and spinal cord. It’s usually caused by a bacteria or a virus. It can develop suddenly, with symptoms like a fever and a headache. Other symptoms may include:

  • feeling drowsy
  • a stiff neck
  • being sick (vomiting)
  • a sensitivity to bright lights
  • fits (seizures)
  • a rash that doesn’t go away when you roll a glass over it

Meningitis can be life-threatening, so get immediate medical help if you suspect you have it.

When to see a doctor about a headache and fever

Having a headache and fever at the same time isn’t usually a sign of something serious, but in some cases it can be.

Go to hospital or call an ambulance if you have a bad headache and a fever, and you:

  • find the headache suddenly becomes really bad
  • have a stiff neck or a sensitivity to bright lights
  • are vomiting, feel confused or are having fits (seizures)
  • have blurred or double vision
  • have a rash that doesn’t fade when you press on it or roll a glass over it
  • have trouble speaking
  • have drooping on one side of your face, numbness in your arms or legs, or trouble moving your arms or legs (weakness)
  • feel unwell or have other signs of sepsis
  • have swelling or redness around your eye that’s spreading
  • are fainting
  • have difficulty breathing, chest pain or coughing up blood
  • have taken a medication or had a vaccine and have developed symptoms of a serious allergic reaction called anaphylaxis

You should also go to an emergency department or call an ambulance if it’s been between 4 days and 4 weeks since you had a COVID-19 vaccine and you have signs of a serious reaction to the COVID-19 vaccine.

See a doctor as soon as possible if you have a headache and fever, and:

  • your symptoms get worse, don’t get better with painkillers or keep coming back
  • your headache is worse when you lie or bend down
  • you’re over 65, pregnant or have a long-term medical condition
  • you have a weak immune system (e.g. from chemotherapy or HIV)
  • you’ve recently travelled to an area with malaria or dengue fever

Treatment for a headache and high temperature

You can take painkillers to help with the pain of a headache and to bring your temperature down. But before doing so, speak to a pharmacist or doctor for advice on how to safely use painkillers.

Drinking lots of fluids, like water, may also help. But, you may need medical advice and more specific treatment, depending on the cause of your symptoms.

Read more about different types of headaches and natural remedies for a fever.

Respiratory tract infections

Many infections, including a cold, ear and throat infections, sinusitis and flu, can get better by themselves without you needing to see a doctor. General things you can do to ease your symptoms include resting and drinking lots of water to keep hydrated.

Read more about how to treat a cold at home and which natural remedies you can try to treat the flu.

Heat exhaustion and heatstroke

If you have heat exhaustion, it usually isn’t serious, but it’s important to try to cool down as soon as possible. You can do this by:
1. Moving to a cool place.
2. Lying down with your feet slightly raised.
3. Drinking lots of fluids.
4. Cooling down your skin with cold water.

If you don’t start to feel better within 30 minutes, become short of breath, pass out or get confused, call an ambulance. Heatstroke can be very serious if it isn’t treated quickly.

Read more about how to treat and prevent heatstroke at home.

Medication or vaccination side effects

You generally don’t need to see a doctor if you have mild side effects from medication, such as a slight headache. There’s also usually no need to see a doctor if you develop a fever and headache after a vaccine - this is common and typically goes away within a few days.

But if you have a serious headache or develop a fever after starting a new medicine, see a doctor, as it can be a sign of a more serious reaction. You should also see a doctor if you have a headache that lasts longer than a week or fever lasts longer than 2 days after having a vaccine.

And if you think you’re having a very serious reaction to a vaccine or medicine, go to a hospital or call an ambulance immediately.

Encephalitis

Encephalitis is a very serious condition that needs to be treated in a hospital. The treatment you have will depend on the cause and may include:

Read more about how encephalitis is diagnosed and treated.

Meningitis

Meningitis can become very serious if it’s not treated quickly. You’ll usually be admitted to hospital and treatment may include:

  • antibiotics into a vein (IV)
  • steroids to reduce swelling around your brain
  • fluids into a vein
  • oxygen if you’re having any trouble breathing

There are also vaccines to help prevent some types of meningitis. Find out all you need to know about meningitis.

How long does it take for a headache and fever to get better?

Some causes of a headache and fever get better on their own or with self-care. But other more serious conditions will need treatment from a doctor or in hospital – and can take longer to recover from. This is why it’s important to try and identify the cause of these symptoms to make sure you get the correct treatment and rule out anything serious.

If your symptoms don’t get better with self-care, you’re worried or if you have any of the symptoms listed in the ‘When to see a doctor’ section above, see a doctor or get emergency medical treatment.

Your health questions answered

  • Why do I have a headache, a fever and also leg pain?

    If you have a headache, fever and aching joints, like leg pain, it may be an early symptom of an infection. Many infections can cause body aches and pains, including respiratory tract infections like flu. More serious infections like meningitis and encephalitis and also rarer ones like dengue fever may also cause muscle and joint pain. If you have pain in your leg with swelling or redness, and a fever, you might have an infection in your skin or in a joint. An infection in your spine could also cause leg pain and fever. It’s best to see a doctor as soon as you can if you think you might have a serious infection.

Key takeaways

  • a mild headache and a slight fever are usually easy to treat and should get better quickly with rest and medication from a pharmacist
  • some medications – such as antibiotics or medicines for epilepsy – commonly cause a headache and sometimes, they may trigger an allergic reaction that causes a fever
  • you generally don’t need to see a doctor to treat mild headaches or a low-grade fever that develop after being vaccinated, but you should seek medical advice if they become serious or you think you’re having a serious allergic reaction
  • if your headache is really bad and your temperature is very high, or they get worse quickly, see a doctor as soon as possible
  • if you think these 2 symptoms might be due to encephalitis or meningitis, it’s very important that you call an ambulance or go to hospital immediately
Was this article helpful?

We include references at the end of every article, so you know where we get our facts. We only ever take evidence from medically-recognised sources, approved by the UK National Health Service's The Information Standard, or certified by Health On the Net (HON). When we talk about popular health trends or claims, we'll always tell you if there's very little or no evidence to back them up. Our medical team also checks our sources, making sure they're appropriate and that we've interpreted the science correctly.

Important: Our website provides useful information but is not a substitute for medical advice. You should always seek the advice of your doctor when making decisions about your health.