Smart Systems for Home

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

Google Sheets QUARTILE.INC: Guide and Examples

· 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

The QUARTILE.INC function in Google Sheets calculates the quartile of a data set, where the quartile is a value that divides the data into four equal groups. To use it, enter =QUARTILE.INC(data, quartile), where "data" is the range of cells and "quartile" is a number from 0 to 4 representing which quartile you want to find. This function is specifically an "inclusive" calculation, meaning it includes the minimum and maximum values of the data set in its calculations, making it ideal for general statistical analysis where the full range of the data must be accounted for.

What You'll Need

  • A Google account with access to Google Sheets.
  • A dataset consisting of numerical values (integers or decimals).
  • A basic understanding of which quartile (0, 1, 2, 3, or 4) you need to identify for your specific analysis.

Step-by-Step

  1. Prepare Your Data: Open your Google Sheet and ensure your numerical data is organized in a single column or row. For example, if you are tracking monthly sales, place all sales figures in column A (A2:A100). Ensure there are no text strings or empty cells within the range that might interfere with the calculation, although QUARTILE.INC generally ignores non-numeric values.
  2. Select the Output Cell: Click on the empty cell where you want the result of the quartile calculation to appear.
  3. Enter the Function Start: Type =QUARTILE.INC( into the cell. This tells Google Sheets you are initiating the inclusive quartile formula.
  4. Define the Data Range: While the cursor is still inside the parentheses, use your mouse to highlight the range of cells containing your numbers. If your data is in cells A2 through A20, the formula will now look like =QUARTILE.INC(A2:A20,. Alternatively, you can type the range manually.
  5. Add the Quartile Argument: Type a comma to separate the range from the quartile indicator, then enter a number from 0 to 4 based on the following definitions:
    • 0: Returns the minimum value of the data set.
    • 1: Returns the first quartile (25th percentile).
    • 2: Returns the median value (50th percentile).
    • 3: Returns the third quartile (75th percentile).
    • 4: Returns the maximum value of the data set.
  6. Complete the Formula: Close the parentheses with ) and press Enter. For example, to find the 75th percentile of your sales data, the final formula would be =QUARTILE.INC(A2:A20, 3).
  7. Verify the Result: Check the resulting number against your data. The first quartile should be a value that 25% of your data falls below, and the third quartile should be a value that 75% of your data falls below.

Common Mistakes

One of the most frequent errors is using a quartile argument outside the 0-4 range. If you enter a number like 5 or -1, Google Sheets will return a #NUM! error because the function only recognizes the five specific markers of a quartile distribution. Another common mistake is selecting a range that contains text headers. While the function ignores text, including headers can sometimes lead to confusion when auditing the formula later, especially in complex sheets.

Users also often confuse QUARTILE.INC with QUARTILE.EXC. The "INC" stands for inclusive, meaning it includes the boundaries of the data set. The "EXC" (exclusive) version excludes these boundaries, which results in different values for the 1st and 3rd quartiles. Using the wrong version can lead to slight discrepancies in statistical reporting, particularly in smaller datasets where the difference between inclusive and exclusive calculations is more pronounced.

Finally, some users forget to use absolute references when dragging the formula across multiple cells. If you are calculating quartiles for several different categories using the same data range, you must use dollar signs (e.g., $A$2:$A$20) to lock the range. Without these, Google Sheets will shift the range downward as you drag the fill handle, leading to incorrect calculations or #VALUE! errors as the formula begins to reference empty cells.

Tips

To make your spreadsheet more dynamic, instead of typing the quartile number (0-4) directly into the formula, refer to a cell. For example, put the number 1 in cell B1 and use the formula =QUARTILE.INC(A2:A20, B1). Now, you can simply change the number in B1 to instantly switch between the minimum, 1st quartile, median, 3rd quartile, and maximum without editing the formula itself.

If you are working with a massive dataset that spans multiple sheets, consider using a Named Range. Highlight your data, go to Data > Named ranges, and name it "SalesData". Your formula then becomes =QUARTILE.INC(SalesData, 1). This makes the formula much easier to read and maintain, especially when sharing the document with colleagues who may not know exactly where the raw data is stored.

Combine QUARTILE.INC with the sparkline function to create a visual representation of your data distribution. By calculating the 1st, 2nd, and 3rd quartiles, you can manually build a box-and-whisker plot using a combination of cells and borders, or use the data to feed into a chart, providing a professional visual summary of your data's spread and skewness.

Troubleshooting

If the function returns a #NUM! error, first check your quartile argument. Ensure it is exactly 0, 1, 2, 3, or 4. If the number is a result of another formula, ensure that formula is returning a whole number and not a decimal (like 1.5), as QUARTILE.INC requires an integer for the second argument.

If you see a #VALUE! error, it typically means there is a problem with the data range. Check for cells that contain errors themselves (like #REF! or #DIV/0!) within the range you selected. QUARTILE.INC cannot calculate a result if any cell within the target range contains an existing error. Clear those errors or use the IFERROR function to clean your raw data first.

If the result seems mathematically incorrect, verify that your data is actually numeric. Sometimes numbers are formatted as text (often indicated by a small green triangle in the corner of the cell or by the number being left-aligned). You can fix this by highlighting the column and going to Format > Number > Number. If the data is stored as text, QUARTILE.INC will ignore those cells, potentially leading to a result based on only a fraction of your actual data.

If the formula is not updating when you change the data, check your calculation settings. While Google Sheets usually updates in real-time, extremely large sheets may experience lag. Ensure you are connected to the internet and that the sheet has finished loading all calculations.

Frequently Asked Questions

What is the difference between QUARTILE.INC and QUARTILE.EXC?

QUARTILE.INC includes the minimum and maximum values in its calculation, while QUARTILE.EXC excludes them. This means QUARTILE.INC is more common for general business reporting, whereas QUARTILE.EXC is often used in specific academic statistical models.

Can I use QUARTILE.INC for non-numeric data?

No, the function only works with numerical values. If you apply it to a range of text, it will ignore the text. If the range contains only text, it will return an error because there are no numbers to calculate.

Does QUARTILE.INC automatically sort my data?

Yes, the function handles the sorting internally. You do not need to sort your data from smallest to largest before using the formula; Google Sheets will treat the range as a sorted set regardless of the original order of the cells.

What happens if my data set has an even number of values?

The function uses interpolation to find the quartile. If the quartile falls between two values, QUARTILE.INC calculates a weighted average between those two points to provide a precise inclusive value.

Can I use this function across different tabs?

Yes, you can reference data on another sheet by including the sheet name in the range. For example: =QUARTILE.INC('Sheet2'!A2:A100, 1). Ensure the sheet name is wrapped in single quotes if it contains spaces.