In epidemiology, understanding the spread of illness within a specific population during a limited time period is crucial for outbreak investigation. The Attack Rate is a biostatistical measure of the frequency of morbidity, or speed of spread, in an at risk population. It is essentially an incidence rate calculated for a narrow population during an outbreak, such as foodborne illness at an event.
Use the calculator below to quickly determine the attack rate based on the number of new cases and the total population at risk.
Calculated Attack Rate
0%
What is an Attack Rate?
An attack rate is a cumulative incidence rate used for specific disease outbreaks. Unlike standard incidence rates which might track disease over a year across a country, an attack rate tracks a specific event (like a wedding reception or a cruise ship voyage) where a group of people were exposed to a common source of infection.
It helps epidemiologists identify the source of an outbreak. By calculating attack rates for people who ate specific foods vs. those who did not, investigators can pinpoint the contaminated item.
The Formula
The calculation is straightforward. It represents the percentage of the at-risk population that contracted the disease.
Attack Rate (%) = (Number of new cases / Total population at risk) × 100
Number of new cases: The count of individuals who got sick during the outbreak period.
Total population at risk: The total count of individuals who were exposed to the source (this includes both those who got sick and those who did not).
Example Calculation
Imagine a company picnic where 150 employees ate the potato salad. Within 24 hours, 45 of those employees reported symptoms of food poisoning.
To calculate the attack rate for the potato salad:
Identify new cases: 45
Identify population at risk: 150
Divide cases by population: 45 / 150 = 0.30
Multiply by 100: 0.30 × 100 = 30%
The attack rate for the potato salad is 30%.
Food-Specific Attack Rates (Risk Ratio)
During an investigation, you often calculate two attack rates for every food item:
Attack Rate in Exposed: Percentage of people who ate the food and got sick.
Attack Rate in Unexposed: Percentage of people who did not eat the food but still got sick (perhaps due to cross-contamination).
If the attack rate is significantly higher for those who ate a specific item compared to those who didn't, that item is likely the source of the outbreak.
Frequently Asked Questions
What is a Secondary Attack Rate?
The secondary attack rate measures the spread of disease from the primary cases (the first people to get sick) to their close contacts (like family members) within an incubation period. It is used to estimate the contagiousness of the disease in a household or close-contact setting.
Why is it called a "rate" if it is a proportion?
Technically, the attack rate is a risk or proportion because the denominator is the population at the start of the interval, and time is not explicitly in the denominator (unlike an incidence density rate). However, "Attack Rate" is the established terminology in epidemiology.
Can the attack rate be greater than 100%?
No. Since the number of cases cannot exceed the total number of people exposed, the maximum possible attack rate is 100%.
function calculateAttackRate() {
// 1. Get input elements
var casesInput = document.getElementById("newCases");
var popInput = document.getElementById("populationAtRisk");
var resultBox = document.getElementById("resultDisplay");
var rateValue = document.getElementById("rateResult");
var interpText = document.getElementById("interpretation");
var errorBox = document.getElementById("errorDisplay");
// 2. Parse values
var cases = parseFloat(casesInput.value);
var population = parseFloat(popInput.value);
// 3. Reset display
errorBox.style.display = "none";
resultBox.style.display = "none";
// 4. Validation Logic
if (isNaN(cases) || isNaN(population)) {
errorBox.innerHTML = "Please enter valid numbers for both fields.";
errorBox.style.display = "block";
return;
}
if (population <= 0) {
errorBox.innerHTML = "The population at risk must be greater than zero.";
errorBox.style.display = "block";
return;
}
if (cases population) {
errorBox.innerHTML = "Error: The number of cases (" + cases + ") cannot be greater than the total population (" + population + ").";
errorBox.style.display = "block";
return;
}
// 5. Calculation Logic
// Formula: (Cases / Population) * 100
var rate = (cases / population) * 100;
// 6. Output Formatting
// Round to 2 decimal places
var finalRate = rate.toFixed(2);
// Determine context string based on percentage
var contextMsg = "";
if (finalRate == 0) {
contextMsg = "No illness was detected in the exposed population.";
} else if (finalRate < 10) {
contextMsg = "This indicates a relatively low spread within the exposed group.";
} else if (finalRate < 50) {
contextMsg = "This indicates a moderate spread of illness.";
} else {
contextMsg = "This indicates a high rate of illness, suggesting a highly infectious agent or significant exposure.";
}
// 7. Display Results
rateValue.innerHTML = finalRate + "%";
interpText.innerHTML = "Out of " + population + " exposed individuals, " + cases + " became ill." + contextMsg;
resultBox.style.display = "block";
}