{
  "id": "frequency-distribution",
  "version": "22e3257fd34c",
  "status": "published",
  "name": "Frequency Distribution Calculator",
  "question": "What is the frequency distribution?",
  "summary": "Makes a frequency table from a list of numbers, by equal-width classes or by each value, with the frequency, relative frequency, and cumulative frequencies of each row.",
  "category": "statistics",
  "subcategory": "descriptive",
  "url": "https://www.acalculator.org/statistics/frequency-distribution-calculator",
  "markdown": "https://www.acalculator.org/statistics/frequency-distribution-calculator.md",
  "kind": "schedule",
  "method": "Classes: start = ⌊min ÷ w⌋ × w unless typed; a number x goes to class ⌊(x − start) ÷ w⌋; relative frequency = f ÷ n; cumulative frequency adds f row by row.",
  "assumptions": [
    "Classes include their lower edge and leave out their upper edge, so a number on an edge counts in the class that starts there.",
    "Empty classes between the first and last number stay in the table with a frequency of 0."
  ],
  "inputs": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "properties": {
      "data": {
        "title": "Your numbers",
        "description": "The numbers, separated by commas, spaces, semicolons, or new lines.",
        "type": "array",
        "items": {
          "type": "number"
        }
      },
      "by": {
        "title": "Group by",
        "description": "Equal-width classes, or one row for each different value.",
        "type": "string",
        "enum": [
          "class",
          "value"
        ]
      },
      "width": {
        "title": "Class width",
        "description": "How wide each class is. Every class has the same width.",
        "type": "number",
        "exclusiveMinimum": 0,
        "maximum": 1000000000000
      },
      "start": {
        "title": "First class starts at",
        "description": "The lower edge of the first class. Leave it empty to start at a multiple of the width.",
        "type": "number",
        "minimum": -1000000000000,
        "maximum": 1000000000000
      }
    }
  },
  "outputs": {
    "modal": {
      "label": "Most common",
      "description": "The class or value with the highest frequency, and that frequency.",
      "format": "text"
    },
    "rows": {
      "label": "Rows",
      "description": "How many classes or values the table has.",
      "format": "integer"
    },
    "n": {
      "label": "Count (n)",
      "description": "How many numbers are in the list.",
      "format": "integer"
    }
  },
  "defaultAnswer": {
    "inputs": {
      "data": "59, 62, 66, 68, 71, 74, 75, 77, 78, 81, 83, 83, 84, 85, 86, 88, 90, 92, 95, 97",
      "by": "class",
      "width": 10
    },
    "outputs": {
      "modal": "80 to under 90, with 7 of 20 numbers",
      "rows": 5,
      "n": 20
    },
    "text": "The most common row of the frequency distribution is 80 to under 90, with 7 of 20 numbers."
  },
  "examples": [
    {
      "given": {
        "data": [
          59,
          62,
          66,
          68,
          71,
          74,
          75,
          77,
          78,
          81,
          83,
          83,
          84,
          85,
          86,
          88,
          90,
          92,
          95,
          97
        ],
        "by": "class",
        "width": 10
      },
      "expect": {
        "modal": "80 to under 90, with 7 of 20 numbers",
        "rows": 5,
        "n": 20
      },
      "source": "OpenStax, Introductory Statistics 2e, §1.3 Frequency, Frequency Tables, and Levels of Measurement (frequency, relative frequency = frequency ÷ total, cumulative relative frequency), https://openstax.org/books/introductory-statistics-2e/pages/1-3-frequency-frequency-tables-and-levels-of-measurement (retrieved 2026-10-05); OpenStax, Introductory Statistics 2e, §2.2 Histograms, Frequency Polygons, and Time Series Graphs (equal-width classes from a starting point), https://openstax.org/books/introductory-statistics-2e/pages/2-2-histograms-frequency-polygons-and-time-series-graphs (retrieved 2026-10-05); hand calculation in content.mdx: classes starting at 50, 60, 70, 80 and 90 hold 1, 3, 5, 7 and 4 scores"
    },
    {
      "given": {
        "data": [
          2,
          3,
          2,
          5,
          3,
          3,
          7,
          5,
          2,
          3,
          5,
          5,
          3,
          5,
          5,
          2,
          5,
          3,
          7,
          7
        ],
        "by": "value"
      },
      "expect": {
        "modal": "5, with 7 of 20 numbers",
        "rows": 4
      },
      "source": "OpenStax, Introductory Statistics 2e, §1.3 Frequency, Frequency Tables, and Levels of Measurement (frequency, relative frequency = frequency ÷ total, cumulative relative frequency), https://openstax.org/books/introductory-statistics-2e/pages/1-3-frequency-frequency-tables-and-levels-of-measurement (retrieved 2026-10-05); hand calculation in content.mdx: 2 four times, 3 six times, 5 seven times, 7 three times"
    },
    {
      "given": {
        "data": [
          0.1,
          0.2,
          0.3,
          0.35
        ],
        "by": "class",
        "width": 0.1,
        "start": 0.1
      },
      "expect": {
        "modal": "0.3 to under 0.4, with 2 of 4 numbers",
        "rows": 3
      },
      "source": "OpenStax, Introductory Statistics 2e, §2.2 Histograms, Frequency Polygons, and Time Series Graphs (equal-width classes from a starting point), https://openstax.org/books/introductory-statistics-2e/pages/2-2-histograms-frequency-polygons-and-time-series-graphs (retrieved 2026-10-05); hand calculation in content.mdx: classes 0.1–0.2, 0.2–0.3, 0.3–0.4 hold 1, 1, 2"
    }
  ],
  "sources": [
    "OpenStax, Introductory Statistics 2e, §1.3 Frequency, Frequency Tables, and Levels of Measurement: frequency, relative frequency (frequency ÷ total) and cumulative relative frequency. https://openstax.org/books/introductory-statistics-2e/pages/1-3-frequency-frequency-tables-and-levels-of-measurement (retrieved 2026-10-05)",
    "OpenStax, Introductory Statistics 2e, §2.2 Histograms, Frequency Polygons, and Time Series Graphs: classes of equal width from a starting point. https://openstax.org/books/introductory-statistics-2e/pages/2-2-histograms-frequency-polygons-and-time-series-graphs (retrieved 2026-10-05)"
  ],
  "related": [
    "mean-median-mode",
    "percentile",
    "quartile"
  ],
  "changelog": []
}
