Relative Frequency Calculator & Cohort Histogram

Use shared measurement intervals to compare two differently sized groups. Enter raw observations or existing counts per interval. Read counts and percentages, compare width-normalized histograms and check how much of each cohort falls strictly below an entered cutoff. If only grouped counts are available, see the exact bounds determined by those counts.

Statistics worksheet

Compare relative frequencies across two cohorts

Measure counts and shares on common intervals, then see what each cohort tells you about a cutoff.

The grouped counts leave the ranking unresolved.

Cohort A below 25 ms
55%
11 of 20 strictly below cutoff
Cohort B below 25 ms
30%–80%
30 to 80 of 100 · interval 3 crosses cutoff

B minus A below cutoff -25 to +25 percentage points.

Shared measurement intervals

Use one unit for both cohorts. The selector labels numbers without conversion.

Measurements equal to this cutoff stay outside the below-cutoff share.

Enter 2–17 increasing boundaries, separated by commas, tabs or new lines. Equal widths are optional.

Cohort A

Paste 1–300 values separated by commas, tabs or new lines.

Cohort B

Enter one whole count for each interval, starting with the lowest.

Compare the cohort distributions
Relative-frequency density by intervalCohort A has 20 entries and Cohort B has 100. Width is measured in ms and each bar area represents its share. The cutoff is 25 ms.Measurement (ms)Density
Cohort ACohort BCutoff 25 ms

Bar area gives the interval share. Height measures share per ms, so unequal widths stay comparable.

Open frequency and cumulative ledger

Every interval includes its lower boundary. Only the final interval includes its upper boundary.

Counts, interval shares, density and cumulative shares by cohort
Interval (ms)CohortCountInterval shareDensity (share per ms)Cumulative countCumulative share
[0, 10)Cohort A315%0.015315%
[0, 10)Cohort B1010%0.011010%
[10, 20)Cohort A630%0.03945%
[10, 20)Cohort B2020%0.023030%
[20, 40)Cohort A525%0.01251470%
[20, 40)Cohort B5050%0.0258080%
[40, 80]Cohort A630%0.007520100%
[40, 80]Cohort B2020%0.005100100%
Download relative frequency CSV
Show selectable CSV

How to use this calculator

  1. Enter a common unit and at least two increasing interval boundaries. Use the same measurement scale for both cohorts.
  2. Choose raw observations or grouped counts separately. Paste measurements or one whole count per interval in ascending boundary order.
  3. Enter the cutoff. Read the exact share below it when known, or the possible range when the cutoff divides a populated grouped interval.
  4. Compare physical-width density bars or cumulative shares through the bins, then open the ledger or download the CSV.

The Formula

The mathematical logic powering this calculation is:

For cohort size n and interval count c, relative frequency is c/n. Cumulative share at the upper boundary of an interval is the sum of shares through that interval. Every interval includes its lower edge. It excludes its upper edge except for the final interval, which includes both endpoints. All entered observations must be inside the shared full range.

Histogram density is c/(n × width) on the measurement scale. The area of each rectangle is the frequency share c/n, and their areas sum to 1 for each cohort. A narrow interval can have a taller bar than a wider interval with more observations. The cumulative chart shows shares through entered intervals at their boundaries. It does not interpolate shares inside intervals.

The cutoff uses strict inequality. Raw inputs count only measurements lower than the cutoff. When counts are grouped, include intervals entirely below the cutoff, exclude intervals starting at or above it and count zero through all of any interval crossing it. When the cutoff equals an internal edge, the interval below it is fully known. At the final edge, grouped counts cannot say which observations equal that edge. An empty crossing interval yields an exact fraction. The group difference is Cohort B minus Cohort A, from B’s minimum minus A’s maximum through B’s maximum minus A’s minimum. This range describes the supplied data, rather than a confidence interval.

Use one unit and 2–17 strictly increasing boundaries with up to six decimals. Measurements and cutoff lie within −1,000,000 to 1,000,000. Each cohort supports 1–300 raw values or one count per interval from 0 to 1,000,000, with positive total. The unit selector labels numbers without conversion. Comparisons use exact fixed-decimal endpoints and exact count cross-products before formatting.

Worked Example

If you input:

  • Shared interval boundaries: 0, 10, 20, 40, and 80 ms
  • Below-cutoff comparison: 25 ms, excluding observations equal to 25
  • Cohort A raw sample: 20 values yielding counts 3, 6, 5, and 6
  • Cohort B grouped counts: 10, 20, 50, and 20

Result:

Eleven of 20 Cohort A readings are below 25 ms, or 55%. Cohort B can range from 30% to 80% because 25 falls inside its populated 20–40 ms interval. B minus A can range from −25 to +25 percentage points, so the available values leave the ranking unresolved.

Frequently Asked Questions

How do relative frequencies compare groups of different sizes?

For each group, divide the interval count by that group’s total. Compare the resulting shares to separate concentration from sample size.

Why is a histogram bar shorter even if it contains more observations?

This histogram uses density on the vertical axis. Bar area gives the relative frequency. A wider interval can spread a larger count across more measurement units.

Where does a measurement exactly on a boundary go?

It belongs to the interval starting at that boundary. The final boundary is also included in the last interval. Measurements equal to the cutoff do not count as strictly below it.

Why can a grouped result be a range?

A grouped count reveals how many observations are in an interval, while hiding their positions within it. If an interval crosses the cutoff, any count from zero to the full interval count is possible there.

Does a grouped range quantify sampling error?

It quantifies what the entered counts can tell you about the cutoff. It does not estimate uncertainty about future results or a larger population.

Similar Calculators