Why Do You Get a Fever and What Does It Do?

Fever isn’t a malfunction — it’s your immune system at work. Learn how your body raises its temperature, what that does to pathogens, and when to be concerned.

Fever is not a malfunction. It is a coordinated defense strategy your immune system launches on purpose, raising your body’s thermostat to create conditions that slow pathogen growth and accelerate immune activity. The process begins when immune cells detect an invader and release signaling molecules that ultimately reset the temperature-control center in your brain. What follows is a cascade of shivering, blood-vessel constriction, and metabolic changes designed to push your core temperature above its normal range. The story of why your body bothers with all of this, and when it can backfire, is more nuanced than the simple “your body is fighting infection” explanation most people grow up hearing.

How the Fever Cascade Starts

Your immune system has sensors on the surface of its cells that recognize molecular patterns found on bacteria, viruses, and other invaders. One well-studied example involves a receptor called Toll-like receptor 4, which detects a component of bacterial cell walls. When immune cells in the blood and tissues pick up these danger signals, the fever process begins. Research using mouse chimeras showed that all phases of a typical bacterial fever depend on this receptor signaling, with the earliest phase triggered specifically by immune cells originating in the bone marrow.

Once those immune cells are activated, they release signaling proteins called cytokines. Three of the most important fever-inducing cytokines are interleukin-1, interleukin-6, and tumor necrosis factor-alpha. These molecules act as messengers, traveling through the bloodstream and reaching the brain to signal that the body needs to heat up. Studies using mice bred to lack specific cytokines have shown that IL-1 and IL-6 are critical for generating fever during localized infections, though in widespread systemic infections they play a supporting role rather than being the sole drivers.

Resetting the Brain’s Thermostat

The cytokines do not raise your temperature directly. They converge on a small region at the base of the brain called the preoptic hypothalamus, which functions as the body’s thermostat. Here, the cytokines trigger the production of a lipid molecule called prostaglandin E2, or PGE2. This molecule is the final mediator that actually resets the thermostat to a higher setting. PGE2 binds to specific receptors in the hypothalamus and, through a chain of neural signals, activates heat-generating responses throughout the body.

The PGE2 does not come only from the brain itself. Research tracking the earliest moments of fever found that the lungs and liver are major early sources of PGE2 production. In the lungs, roughly nine out of ten cells making the precursor enzymes were macrophages, the same immune cells that first detected the invading pathogen. In the liver, the proportion was similar. So the fever signal is built in two places at once: peripherally in the organs and centrally in the brain.

How Your Body Actually Generates the Heat

Once the hypothalamus has been reset to a higher set point, your current normal temperature suddenly registers as “too cold.” Your body responds the same way it would if you walked outside into freezing weather. Blood vessels near the skin constrict to reduce heat loss, which is why you look pale and feel chilled even though your temperature is climbing. Skeletal muscles begin to shiver, generating heat through rapid contraction. And a specialized tissue called brown fat burns stored energy specifically to produce warmth, a process called non-shivering thermogenesis.

Brown fat is best known for keeping newborns warm, but it plays a role in adult fever too. A recent study in mice infected with Salmonella found that brown fat actively contributes to the fever response during infection, burning lipids and glucose to generate the extra heat needed to raise core body temperature. That feeling of being simultaneously hot and cold during a fever makes sense once you understand the mechanism: your thermostat has been turned up, so until your body temperature catches up to the new set point, you feel cold and shiver. Once the fever breaks and the set point returns to normal, you suddenly feel too warm and start sweating to dump the excess heat.

What Fever Actually Accomplishes

If fever were just a side effect of being sick, evolution would have discarded it long ago because it costs the body a lot of energy to maintain. Instead, it appears to confer real survival benefits through at least two pathways: slowing down the pathogen and boosting the immune response.

On the pathogen side, a mild fever appears to reduce viral replication through several mechanisms, including interfering with how viruses enter host cells and how they transcribe their genetic material. Many bacteria and viruses are exquisitely sensitive to temperature. Even a degree or two above normal can meaningfully slow their ability to reproduce, buying the immune system time to mount a full response.

On the immune side, the elevated temperature stimulates both the innate and adaptive branches of the immune system. The same cytokine IL-6 that helps trigger fever also plays a role in mobilizing immune cells called lymphocytes, directing them toward the lymph nodes where the immune response is coordinated. So fever is not just about cooking the pathogen; it is about rallying the troops at the same time.

An Ancient Strategy, Not a Mammalian Invention

One of the strongest arguments for fever being genuinely useful is how old it is. Fever is not limited to warm-blooded animals. Fish, reptiles, and amphibians all exhibit what researchers call behavioral fever: when infected, they deliberately seek out warmer environments to raise their body temperature. A lizard with an infection will bask on a hot rock. A fish will swim into warmer water.

Recent work on a cold-blooded fish species showed that this behavioral fever optimizes the function of T cells, a key component of adaptive immunity. The researchers concluded that integrating fever with adaptive immunity to gain survival advantages is a strategy that predates the evolution of land-dwelling vertebrates entirely. That means the fever response has been conserved across hundreds of millions of years of evolution, which strongly suggests it provides a meaningful survival advantage. Biology rarely keeps expensive tricks around for that long unless they pay for themselves.

The Energy Tax of Running Hot

Fever is expensive. Maintaining a higher body temperature requires significantly more calories, which is one reason you feel so drained when sick. In studies of children, energy expenditure increased by roughly 11% for every degree Celsius of fever. In mammals generally, the figure tends to land in the range of 10 to 15% per degree. Some animals pay even more: Pekin ducks increased their energy expenditure by about 23% per degree Celsius during a febrile response, suggesting that the metabolic cost varies by species.

This metabolic burden is why your body demands rest and food (or at least fluids) when you are febrile. It is also why severely malnourished or critically ill patients sometimes cannot mount a proper fever. The body needs fuel to run the furnace, and when reserves are low, the trade-off between fighting the infection and conserving energy tips toward conservation.

Fever vs. Hyperthermia

People often confuse fever with other forms of overheating, like heat stroke, but they are fundamentally different. In fever, the thermostat has been intentionally turned up. Your regulatory system is working perfectly; it is just aiming for a higher target. You shiver to get there, you feel cold at first, and aspirin can bring you back down by blocking PGE2 production. In hyperthermia, the thermostat has not changed. Your body is simply overwhelmed by external heat or is producing more heat than it can shed. No amount of aspirin will help because the regulatory mechanism is not the problem.

This distinction matters practically. Someone with heat stroke needs to be physically cooled down (ice packs, cool water, shade). Someone with a fever may benefit from fever-reducing medication if they are uncomfortable, but the underlying heat generation is regulated and self-limiting. Fever rarely climbs above about 41°C (106°F) on its own because the brain’s regulatory ceiling holds it in check, while hyperthermia can keep rising unchecked until it causes organ damage.

When Fever Becomes Dangerous

Though fever is generally protective, it can cause harm in certain populations and at extreme temperatures. Very high body temperatures, regardless of cause, damage cells through multiple mechanisms at the cellular and systemic level. The nervous system is particularly vulnerable. In experimental animals, prolonged high temperatures cause defects in the neural tube and brain, and similar risks apply to human pregnancy: maternal fever, especially in early pregnancy, has been associated with an increased risk of birth defects affecting the central nervous system.

In young children, fever can trigger febrile seizures, which occur in children roughly between 3 months and 5 years of age. These seizures appear to result from a combination of the fever itself and the cytokines flooding the brain, which shift the balance between excitatory and inhibitory nerve signals. The experience is terrifying for parents, but simple febrile seizures are consistently found to be benign, with most children showing normal growth and development afterward. That said, a child who has had a febrile seizure does carry a somewhat higher risk of experiencing seizures later in life. The current understanding is that this risk likely reflects an underlying neurological predisposition rather than being caused by the febrile seizure itself.

Why Older Adults Often Do Not Mount a Fever

One underappreciated clinical reality is that older adults frequently fail to develop a significant fever even when seriously ill. This has given rise to a longstanding clinical saying: “the older, the colder.” Both human and animal studies support the generalization that older adults are less able to mount an effective febrile response.

This blunted fever response is clinically important because doctors and family members often use fever as a signal that something is seriously wrong. When an older person has a severe infection but a normal or only slightly elevated temperature, the infection can go unrecognized until it has progressed dangerously. Pneumonia, urinary tract infections, and sepsis in elderly patients are all notorious for presenting without the obvious fever that would sound alarms in a younger patient.

Should You Treat a Fever?

This is one of the most persistent debates in medicine. Common fever-reducing drugs like acetaminophen and ibuprofen work by blocking the enzyme that produces PGE2, the molecule that resets the brain’s thermostat. Acetaminophen, for example, reduces fever specifically by inhibiting the cyclooxygenase-2 enzyme, which is the same target as other anti-inflammatory drugs.

Given that fever appears to help fight infection, a natural question is whether suppressing it makes you sicker for longer. A systematic review and meta-analysis examining the effects of fever-reducing drugs on respiratory infections found no statistically significant difference in illness duration between treated and untreated groups. However, the analysis did find that anti-inflammatory drugs carried a higher rate of adverse events compared to not treating the fever. In practical terms, for most otherwise healthy people, treating a mild fever for comfort is unlikely to meaningfully prolong illness, but there is no strong evidence that you need to treat it either.

The picture shifts for critically ill patients. In intensive care settings, the question of whether to aggressively control fever remains genuinely unsettled, and practice varies widely among hospitals. Most guidelines currently advise treating fever primarily for comfort or when it reaches levels that could cause harm on their own, rather than reflexively reaching for medication at the first sign of a temperature spike.

Why Feeling Terrible Is Part of the Plan

The fatigue, loss of appetite, social withdrawal, and general misery you experience during a fever are not random side effects. Researchers refer to this constellation as sickness behavior, and it is a coordinated motivational state driven by the same cytokines that produce the fever. The purpose is to promote recovery: if you feel exhausted and uninterested in food, you are more likely to rest, conserve energy, and stay away from situations where you could spread the infection or pick up another one. Together with the fever itself and associated hormonal changes, sickness behavior represents a highly organized strategy for fighting infection, not a sign that things are going wrong.

This reframing matters because many people’s instinct is to power through illness, fighting the fatigue with caffeine and the fever with medication. Understanding that the lethargy and malaise are active immune strategies, not just the body being weak, can shift how you relate to being sick. The discomfort is the system working as intended.

Measuring Fever Accurately

Not all thermometers agree, and the differences can matter clinically. A study comparing three types of infrared thermometers against a standard oral electronic thermometer found meaningful variation. Temporal artery thermometers (the ones swiped across the forehead) had the best combination of sensitivity and specificity, correctly identifying fever about 88% of the time. Tympanic (ear) thermometers performed reasonably well but tended to read slightly high. Contactless infrared thermometers, which became ubiquitous during the COVID-19 pandemic, had a sensitivity of only 13%, meaning they missed the vast majority of fevers despite being very good at correctly classifying non-febrile people.

If you remember the temperature-screening stations at building entrances during the pandemic, this finding puts their reliability into sharp perspective. Those contactless guns were excellent for reassuring people but poor at actually catching fevers. For home use, a standard digital thermometer taken orally or rectally remains the most reliable option. Forehead swipe thermometers are a reasonable second choice, while contactless readings should be treated as rough estimates at best.

When Doctors Deliberately Induced Fever

In one of the stranger chapters of medical history, physicians once used fever as a treatment. In the early twentieth century, Austrian psychiatrist Julius Wagner-Jauregg won the Nobel Prize in Medicine in 1927 for developing a therapy in which patients with neurosyphilis were deliberately infected with malaria to produce high fevers. The rationale was that the sustained high temperatures would kill the syphilis bacteria in the brain, and it worked often enough to be considered a breakthrough in an era with no antibiotics. Malaria therapy for neurosyphilis continued to be used into the early 1960s, providing decades of data on how malaria parasites behave in human hosts. The practice was abandoned once penicillin became widely available, but it remains a vivid illustration of how seriously the medical profession has taken the therapeutic potential of fever itself.