Descriptive Statistics in Excel and Google Sheets

The Excel and Sheets functions for mean, median, mode, STDEV.S vs STDEV.P, VAR, QUARTILE.INC vs EXC and IQR, plus the Data Analysis ToolPak summary.

Choose the Wrong Function and Your Summary is Wrong

You have a column of numbers in Excel or Google Sheets. You want the mean, the standard deviation, the quartiles, the same values your textbook or calculator gives. The problem is not the math. It is picking the right function from a list of near-identical names. Descriptive statistics work requires knowing which formula matches your data: group or sample, inclusive or exclusive quartiles. Pick wrong and the number changes. The function table below shows which formula to use, why, and what to check when the spreadsheet disagrees with your calculator.

Function Table: Every Descriptive Statistic You Need

The table below lists every function you will use for descriptive statistics in Excel and Google Sheets. The column 'Data Type' tells you whether the function expects a complete group (all members of the group) or a sample (a subset from which you estimate). Ignore this column and you get the wrong standard deviation or variance.

Descriptive Statistics Functions in Excel and Google Sheets
MeasureExcelGoogle SheetsData TypeNotes
MeanAVERAGEAVERAGEAnySum divided by count; sensitive to outliers.
MedianMEDIANMEDIANAnyMiddle value after sorting; robust to outliers.
Mode (multiple)MODE.MULTMODE.MULTAnyReturns array of most frequent values; #N/A if none repeat.
Standard Deviation (sample)STDEV.SSTDEVSampleUses n-1 denominator; the default for most real-world data.
Standard Deviation (group)STDEV.PSTDEVPGroupUses n denominator; only when data is the entire group.
Variance (sample)VAR.SVARSampleUses n-1; unbiased estimator of group variance.
Variance (group)VAR.PVARPGroupUses n; average squared deviation from the group mean.
First Quartile (inclusive)QUARTILE.INCQUARTILEAnyHyndman & Fan method R7; includes median in calculation.
Third Quartile (inclusive)QUARTILE.INCQUARTILEAnySame method as Q1.
First Quartile (exclusive)QUARTILE.EXCNone (use QUARTILE.INC)AnyHyndman & Fan method R6; excludes median from halves.
Third Quartile (exclusive)QUARTILE.EXCNone (use QUARTILE.INC)AnySame as above.
MinimumMINMINAnySmallest value.
MaximumMAXMAXAnyLargest value.
RangeMAX-MINMAX-MINAnyDifference between max and min; rarely informative alone.
SumSUMSUMAnyTotal of all values.
CountCOUNTCOUNTAnyNumber of numeric entries.
SkewnessSKEWSKEWSampleMeasures asymmetry; zero is symmetric.
Kurtosis (excess)KURTKURTSampleMeasures tailedness; normal distribution = 0.

Stdev.S vs Stdev.P: The Most Common Mistake

Standard deviation is the most frequently misused function in descriptive statistics work. The two functions are STDEV.S and STDEV.P. Their formulas differ by one number in the denominator: STDEV.P divides by n (the count), while STDEV.S divides by n-1 (Bessel's correction).

Use STDEV.S when your data is a sample, a subset of a larger group. This is almost always the right choice for real-world data. The n-1 correction makes the sample variance an unbiased estimator of the group variance, though the standard deviation itself remains slightly biased low. Use STDEV.P only when your data set is the entire group, every member of the group you care about. A class of 30 students is a group if you only care about that class; it is a sample if you want to infer something about all students in the school.

Failure case: Using STDEV.P on a sample gives a standard deviation that is too small. The error shrinks as n grows, but for a sample of 10 it underestimates the true variability by roughly 5-10 percent. For a sample of 5, the error is larger. Your textbook or calculator almost certainly reports the sample standard deviation (n-1). If your spreadsheet shows a different number, check which function you used.

Quartile Excel: Why Your TI-84 and Your Spreadsheet Disagree

Quartile calculations in Excel often differ from those on a TI-84 calculator or in a textbook. The reason is not a bug, it is a methodological choice. Excel's QUARTILE.INC uses Hyndman and Fan type R-7, which interpolates between data points. The TI-84 uses type R-5, which takes the median of the lower and upper halves, including the overall median in both halves. For an even number of data points, the two methods can yield different Q1 and Q3 values.

Quartile.INC vs Quartile.EXC: QUARTILE.INC (inclusive) includes the median in the calculation of the lower and upper halves. QUARTILE.EXC (exclusive) excludes it. For a data set of 9 values, the inclusive method gives Q1 as the 3rd value; the exclusive method gives it as the 2.5th value (interpolated). Use QUARTILE.INC unless your textbook or exam specifies a different method.

Worked example: Data = {1, 2, 3, 4, 5, 6, 7, 8, 9}. Excel QUARTILE.INC Q1 = 3, Q3 = 7. TI-84 Q1 = 2.5, Q3 = 7.5. The difference is 0.5 on each quartile. For the IQR, that difference can change how you flag outliers using the 1.5*IQR rule. If your textbook uses the median-of-halves method, and your spreadsheet uses inclusive, expect small discrepancies.

What to do: If you need to match a TI-84 or a textbook that uses the median-of-halves method, do not use QUARTILE.INC or QUARTILE.EXC. Calculate Q1 and Q3 manually: sort the data, find the median, then find the median of the lower half (including the overall median) and the median of the upper half (including the overall median). That is the R-5 method.

Data Analysis ToolPak: Descriptive Statistics for the Whole Summary

The Data Analysis ToolPak in Excel generates a full set of descriptive statistics in one click: mean, median, mode, standard deviation (sample and group), variance, range, minimum, maximum, sum, count, quartiles (using the inclusive method), skewness, and kurtosis. To enable it, go to the Excel Data tab, find the Analyze group, and click "Data Analysis." If it is not there, go to File > Options > Add-ins > Manage: Excel Add-ins > Go and check "Analysis ToolPak."

The ToolPak's output is reliable but you must check one setting: it reports both STDEV.S (labeled "Standard Deviation") and STDEV.P (labeled "Standard Deviation (Group)"). The default label is the sample standard deviation. The quartiles it reports use the QUARTILE.INC method. If your textbook uses a different method, the ToolPak's quartiles will differ.

Failure case: The ToolPak reports the sample standard deviation as the primary value, but a user who does not read the label assumes it is the group version. Always check the label. If you need the group version, use the column labeled "Standard Deviation (Group)" or calculate it with STDEV.P.

Google Sheets Equivalents: What Changes, What Stays

Google Sheets uses nearly identical function names to Excel. The key differences: STDEV in Sheets is equivalent to STDEV.S in Excel (sample standard deviation). STDEVP is equivalent to STDEV.P (group). VAR and VARP match VAR.S and VAR.P respectively. For quartiles, Sheets has only QUARTILE, which is equivalent to Excel's QUARTILE.INC. There is no QUARTILE.EXC in Sheets.

MODE.MULT works the same in both: it returns an array of the most frequent values. If no value repeats, it returns #N/A. To see all modes, you need to select multiple cells before entering the formula, or use the array formula syntax. In Sheets, enter =MODE.MULT(range) in a single cell and it returns only the first mode, you must use the array formula version to get all modes.

Missing tool: Sheets does not have a built-in descriptive statistics tool like Excel's Data Analysis ToolPak. You must call each function individually, or use an add-on like XLMiner. The Google Sheets function list documents all available functions.

Common Questions

Why does my standard deviation in Excel not match my calculator?

Your calculator almost certainly reports the sample standard deviation (n-1). In Excel, that is STDEV.S. If you used STDEV.P (group), the value will be smaller. Check which function you used and switch to STDEV.S.

Which quartile method should I use in Excel?

Use QUARTILE.INC unless your textbook or exam explicitly uses a different method. QUARTILE.INC matches the most common interpolation method (R-7). If you need to match a TI-84, calculate quartiles manually using the median-of-halves method.

How do I get multiple modes in Excel?

Use MODE.MULT. Select multiple cells in a row or column, type =MODE.MULT(range), and press Ctrl+Shift+Enter (Excel) or use array formula syntax (Sheets). If no value repeats, it returns #N/A.

When should I use the median instead of the mean?

Use the median when your data is skewed, for example, income data, house prices, or any distribution with outliers. The median is robust to extreme values; the mean is pulled toward the tail. For symmetric data, mean and median are nearly equal.

The Data Analysis ToolPak shows two standard deviations. Which one do I use?

Use the one labeled "Standard Deviation" for a sample. Use the one labeled "Standard Deviation (Group)" only if your data is the entire group. The labels are clear, but many users grab the first number without reading, that is the most common error.