Smart Systems for Home

Plain how-to guides for smart home, security and home Wi-Fi

How to Find Cumulative Relative Frequency in Excel

· 6 min read · Home Tech

In this article
  1. What You'll Need
  2. Step-by-Step
  3. Common Mistakes
  4. Tips
  5. Troubleshooting
  6. Frequently Asked Questions

To find cumulative relative frequency in Excel, you build two helper columns: one for relative frequency (each count divided by the total) and one that adds those fractions up row by row. In practice you sort your data, count each value with COUNTIF, divide by COUNTA, then use a running SUM or a mixed-reference addition. The whole job takes about five minutes and works in Excel for Microsoft 365, Excel 2021, 2019 and 2016 on Windows and Mac; menu labels can differ slightly by version and region.

What You'll Need

  • Excel 2016 or later (desktop) — the formulas below also work in Excel for the web, though the ribbon layout differs.
  • A column of raw data with one value per row, and a short list of the distinct values you want to summarise.
  • Basic familiarity with entering formulas and dragging the fill handle.
  • Optional: the Analysis ToolPak add-in if you prefer the Histogram tool, though it does not produce relative frequency directly.

Step-by-Step

  1. Lay out your data. Put your raw observations in column A, starting at A2 (leave A1 for a header such as Value). In column C, list each distinct value once — for example C2:C6 if you have five categories. Leave column B empty as a spacer or use it for labels; the exact layout is flexible as long as you keep track of ranges.
  2. Count each value. In D2, enter =COUNTIF($A$2:$A$100,C2). The dollar signs lock the data range so it does not shift when you copy the formula down. Drag the fill handle from D2 to the last row of your category list. Each cell now shows how many times that value appears.
  3. Get the total count. In a separate cell — say F1 — enter =COUNTA($A$2:$A$100). This counts every non-empty observation. If your data range is longer or shorter, adjust the row number. Note the total; you will reference it in the next step.
  4. Calculate relative frequency. In E2, enter =D2/$F$1. The absolute reference $F$1 keeps the total fixed as you copy down. Drag to fill E2 through the last category. Format column E as Percentage using Home > Number > Percentage (or the % button) so the fractions read as 0.00%, 12.50% and so on.
  5. Build the cumulative column. In F2 (or the next free column), enter =E2 for the first row. In F3, enter =F2+E3. Copy F3 down to the last category. Each cell now holds the running total: the first row equals the first relative frequency, the second equals the first plus the second, and the last row should equal 100.00% (or 1.000 if formatted as a number).
  6. Verify the final row. The bottom cumulative cell must equal 1 or 100%. If it does not, your total count in F1 is wrong, your data range is too short, or a category in column C does not match the raw values exactly (extra spaces, different case, numbers stored as text).
  7. Sort for a meaningful curve. Cumulative relative frequency only makes sense in order. If your categories are numeric bins (0–9, 10–19, 20–29), sort column C ascending before building the table, or sort the finished table by the category column. For text categories, alphabetical order is the usual choice.
  8. Optional: chart it. Select the category column and the cumulative column, then Insert > Chart > Line or Scatter. A line chart of cumulative relative frequency against category gives you the empirical distribution curve. Add a second series for the plain relative frequency if you want to compare.

Common Mistakes

  • Forgetting absolute references. If you write =D2/F1 instead of =D2/$F$1, the denominator shifts down as you copy and every row after the first divides by the wrong number.
  • Mismatched ranges. COUNTIF and COUNTA must cover exactly the same rows. A COUNTIF range of A2:A100 with a COUNTA of A2:A90 silently undercounts.
  • Text vs number mismatch. A category typed as text "10" will not match a numeric 10 in the data column. Use VALUE() or retype consistently.
  • Hidden rows. COUNTIF and COUNTA include hidden rows; if you filtered the data and expected a filtered total, you need SUBTOTAL or AGGREGATE instead.
  • Adding instead of anchoring. Writing =SUM(E$2:E2) is a valid alternative to the running-addition method, but the mixed reference must be exactly that — a locked start row and a relative end row.
  • Formatting as percentage too early. If you format the relative-frequency column as percentage before copying formulas, the underlying value is still correct, but a manual retype can round it. Format last.

Tips

  • Name your total cell (Formulas > Define Name) so formulas read =D2/TotalCount instead of a cell reference — easier to audit later.
  • Use a dynamic range such as $A$2:$A$1000 with room to spare; blank rows are ignored by COUNTIF and COUNTA.
  • For binned numeric data, build bins with the FREQUENCY array function or by hand, then apply the same relative-and-cumulative pattern.
  • Keep a check cell: =SUM(E2:E6) should equal 1. If it does not, a category is missing or duplicated.
  • Freeze the header row (View > Freeze Panes) when working with long tables so labels stay visible.
  • If you need cumulative relative frequency by group, add a helper column that concatenates group and value, then COUNTIFS on that helper.

Troubleshooting

  • Final cumulative value is not 100%. Check the total count cell first, then confirm every category in column C appears at least once in the raw data. A category with zero matches adds 0% and is usually a spelling or type mismatch.
  • #DIV/0! errors. The total count cell is empty or zero. Confirm COUNTA is pointing at the data column, not a blank column.
  • Percentages look like 0.1250 instead of 12.50%. The cell is formatted as Number. Select the column and apply Percentage format from the Home tab.
  • Cumulative column resets or repeats. The running-addition formula was copied without adjusting the row reference. Rebuild it: first row =E2, second row =F2+E3, then copy that second formula down.
  • Numbers stored as text. A green triangle in the corner of the cell is the tell. Use Data > Text to Columns > Finish, or multiply by 1 in a helper column, to convert.
  • Chart looks flat or jumps. The category column is not sorted. Sort ascending and rebuild the chart.

Frequently Asked Questions

What is the difference between relative frequency and cumulative relative frequency?

Relative frequency is the share of observations in one category (count divided by total). Cumulative relative frequency is the running total of those shares up to and including that category, so the last row always equals 100%.

Can I do this without helper columns?

Yes. A single formula such as =SUM($E$2:E2) placed in the first cumulative cell and copied down produces the running total directly from the relative-frequency column. Helper columns are easier to check, though.

Does the order of categories matter?

For the arithmetic, no — the final value is 100% either way. For interpretation and charts, yes: cumulative curves are only meaningful when categories are sorted, usually ascending for numeric bins.

Why does my last row show 99.99% instead of 100%?

Floating-point rounding. The underlying values are correct; the display rounds each fraction. Increase decimal places or wrap the final cell in ROUND to force an exact 100%.

Can I use COUNTIFS for grouped data?

Yes. COUNTIFS lets you count by two or more criteria, such as category and region. Build the relative frequency with COUNTIFS divided by a matching COUNTIFS total, then apply the same cumulative pattern.

Does this work in Excel for the web and Google Sheets?

The formulas are identical in Excel for the web. In Google Sheets, COUNTIF, COUNTA and SUM behave the same way, though the ribbon labels and chart menus differ.