Relative Frequency Calculator

Relative Frequency Calculator

Turn counts for each category, or a raw list of answers, into proportions and percentages that add up to 100%, with a running total and a bar for each category.

Relative frequency = f ÷ n

Enter each category and its count

What Is Relative Frequency?

Relative frequency is the number of times a category occurs divided by the total number of observations. It expresses each count as a share of the whole, so the shares always add up to 1, or 100%.

Shares make groups of different sizes comparable. 86 car commuters means little until you know it's 86 out of 200 (43%) rather than 86 out of 1,000 (8.6%).

Relative frequency is also the everyday way to estimate a probability from experience. If 43% of staff drove last year, 0.43 is a sensible estimate of the chance a new starter will drive. That estimate firms up as the sample grows.

Relative Frequency Formula

As given in OpenStax Introductory Statistics, section 1.3. See Sources.

1. Total the counts

n = Σ f

2. Divide each count by the total

relative frequency = f ÷ n · percentage = 100 × f ÷ n

3. Accumulate if the order matters

cumulative relative frequency = running total of f ÷ n

Cumulative shares only mean something when categories have a natural order, such as ratings from 1 to 5.

Worked Example: How 200 Staff Get to Work

Given:
A travel survey counts car 86, bus 42, walk 38, cycle 22, train 12.
Step 1:
Total:
86 + 42 + 38 + 22 + 12 = 200
Step 2:
Divide each count by 200:
Car 0.43 · Bus 0.21 · Walk 0.19 · Cycle 0.11 · Train 0.06
Step 3:
Check the shares sum to 1:
0.43 + 0.21 + 0.19 + 0.11 + 0.06 = 1 ✓
Result:
Car 43%, everything else 57%

Active travel (walking and cycling) makes up 30%, more than the 21% who take the bus. That comparison is easy to miss in the raw counts.

Ways to Write a Relative Frequency

The commuting survey written four ways. All say the same thing.

Each category as a fraction, decimal, percentage and natural frequency
ModeFractionDecimalPercentAbout 1 in
Car86/2000.4343%2.3
Bus42/2000.2121%4.8
Walk38/2000.1919%5.3
Cycle22/2000.1111%9.1
Train12/2000.066%16.7

Common Relative Frequency Mistakes

  • Dividing by the wrong total. If people could tick several options, the shares can add up to more than 100%. Divide by respondents and say so.
  • Reading too much into small samples. 2 out of 3 is 67%, but it's a very shaky estimate of the true share.
  • Misspelt categories. "Bus", "bus" and "buses" should be one category. The raw responses mode ignores capitals but can't merge different words.
  • Cumulating unordered categories. A running total through car, bus and walk has no meaning; it depends on the order you typed them.

Relative Frequency FAQs

How do you calculate relative frequency?

Divide the count for a category by the total count. Multiply by 100 for a percentage.

Is relative frequency the same as probability?

It’s an estimate of probability based on observed data. With more data, it settles closer to the true probability.

Do relative frequencies always add to 1?

Yes, when every observation falls in exactly one category. Rounding can make the displayed figures sum to 0.99 or 1.01.

What input formats work?

In counts mode, one category per line with a colon, equals sign, comma, tab or space before the count. In raw mode, any list separated by commas, semicolons or new lines.

Can counts be decimals?

Yes, for weighted survey totals, for example. The shares are calculated the same way.

Why are raw responses sorted by count?

So the most common answers appear first. In counts mode, your own order is kept.

What about numeric data?

For numbers grouped into ranges, use the frequency distribution calculator, which builds the classes for you.

How do I show this as a chart?

A bar chart of the percentages works for any categories. A pie chart works when there are only a few categories that make up a whole.

Sources

Related Tools