Check Sheet Logo
Check Sheet

FREQUENCY

The FREQUENCY function in Google Sheets returns an array of frequencies of values in a dataset. It is commonly used to create a histogram. The output is an array with the same number of elements as the classes parameter (second argument).

Usage

Use the FREQUENCY formula with the syntax shown below, it has 2 required parameters:

=FREQUENCY(data, classes)
Parameters:
  1. data (required):
    The array or range of values to be counted.
  2. classes (required):
    The array or range of intervals (bins) to group the values into.

Examples

Here are a few example use cases that explain how to use the FREQUENCY formula in Google Sheets.

Count the number of values within a specific range

By using the FREQUENCY function, you can easily count the number of values within a specific range. For example, if you have a list of grades and you want to know how many students scored between 60-69, 70-79, and 80-89, you can use the FREQUENCY function to group the grades into these ranges and count the number of values in each range.

Create a histogram

The FREQUENCY function is commonly used to create histograms. A histogram is a chart that shows the distribution of values in a dataset. By using the FREQUENCY function to group the values into intervals (bins), you can create a histogram that shows how many values fall into each interval.

Calculate the mode

The mode is the value that appears most frequently in a dataset. By using the FREQUENCY function, you can easily calculate the mode. The mode is the value that corresponds to the highest frequency in the array returned by the FREQUENCY function.

Common Mistakes

FREQUENCY not working? Here are some common mistakes people make when using the FREQUENCY Google Sheets Formula:

Incorrect data range

One common mistake is providing an incorrect data range that does not match the number of classes specified. Double-check that the data range and classes match.

Incorrect class range

Another common mistake is providing an incorrect class range that does not include all of the values in the data range. Double-check that the class range includes all the values in the data range.

Non-numeric data

If your data contains non-numeric values, the FREQUENCY function will return an error. Make sure your data is numeric before using this function.

Incorrect array formula syntax

If you forget to enter the formula as an array formula (by pressing Ctrl+Shift+Enter), the FREQUENCY function will not work properly. Make sure to enter the formula correctly.

Undefined classes

If you do not specify the number of classes, the FREQUENCY function will return an error. Make sure to specify the number of classes.

The following functions are similar to FREQUENCY or are often used with it in a formula:

  • COUNTIF

    The COUNTIF formula counts the number of cells within a specified range that meet a certain criterion. This formula is commonly used to count cells that meet a specific condition or criteria.

  • SUMIF

    The SUMIF formula is used to add up values in a range that meet a specific criterion. It can be used to sum values based on text, numbers, or dates. The formula is most commonly used in financial analysis, budgeting, and data analysis.

  • AVERAGEIF

    The AVERAGEIF function calculates the average of a range of cells that meet a specified criteria. It is commonly used when working with large datasets to quickly calculate the average of a subset of data. The function takes a range of cells to evaluate (criteria_range), a string or value to compare against (criterion), and an optional range of cells to average (average_range). If the average_range is not specified, the function will use the same range as the criteria_range.

  • MEDIAN

    The MEDIAN function returns the median (middle) value of a set of numbers. It is commonly used to find the middle value in a range of data points. If the number of data points is even, it returns the average of the two middle values. This function can be useful in statistical analysis and data visualization.

Learn More

You can learn more about the FREQUENCY Google Sheets function on Google Support.