Statistical Functions in Excel: AVERAGE, MEDIAN, COUNTIF, STDEV, and 40+ More | Sheets & Cells
Functions · Statistical

Statistical Functions

Every function Excel offers for aggregating, counting, ranking, and analyzing numeric data. From the daily-driver AVERAGE and COUNTIF to serious analytics like STDEV and CORREL. Grouped by task, with deep guides for the ones you'll actually use — plus reference entries for everything else.

Almost every statistical function is universally supported
AVERAGE, COUNT, COUNTIF, MIN, MAX, MEDIAN, STDEV, VAR — all Excel 1.0+ or 2007+. The IFS variants (COUNTIFS, AVERAGEIFS, MAXIFS, MINIFS) are 2007+ or 2016+. Only a handful of modern additions require Excel 365. Every page notes its exact compatibility.
40+
Statistical functions
7
Deep-dive guides live
5
Task-based subcategories
100%
Google Sheets compatible

The eight statistical functions we've written full guides for. If you're only going to learn a handful of stat functions, these are the ones that pay back the effort.

Basic aggregates

The everyday functions everyone learns first. Take a range of numbers, return a single summary value — no conditions, no filtering, just plain math.

Counting

Not "how big" but "how many". Five core functions distinguish numbers from text from blanks from conditional matches.

Quick rule: COUNT for numbers, COUNTA for anything filled in, COUNTBLANK for holes, COUNTIF/COUNTIFS for conditional. Getting these confused is the #1 source of wrong totals in dashboards.

Conditional aggregates

Averaging, counting, or finding extremes — but only for rows that meet conditions. This is where statistical Excel meets real business analysis.

3 Legacy — one condition

Excel 2003-era single-condition versions. Universal support, simpler syntax when you only need one filter. Note that SUMIF is in Math, not Statistical — a quirk of Excel's category system.

4 Modern — multiple conditions

The IFS family from Excel 2007+ (and MAXIFS/MINIFS from 2019+). AND logic across every criteria pair. Same argument order convention: aggregate_range FIRST, then range/criteria pairs.

Ranking & percentile

Where does a value stand relative to the rest? Rank it, find the nth largest, or compute percentiles for benchmarking.

Distribution & variance

How spread out is your data? How correlated are two columns? These are the analytics functions — real stats, not just aggregates.

6 Spread — variance & standard deviation

STDEV variants for standard deviation, VAR variants for variance. Choose .S for a sample, .P for a population — the distinction matters more than most people realize.

Which function should I use?

Match the task to the function

Common questions people ask about statistical work in Excel — and the right function to reach for.

"How many rows meet a condition?"
One condition → COUNTIF. Multiple → COUNTIFS. No condition → COUNTA (any filled) or COUNT (numbers only).
COUNTIF COUNTIFS
"Find duplicates in a column"
The COUNTIF pattern: COUNTIF(range, cell) > 1. Wrap in IF for readable labels or use it in a conditional-formatting rule.
COUNTIF IF
"Average sales per rep this quarter"
One filter → AVERAGEIF. Two or more filters (rep AND product AND date range) → AVERAGEIFS.
AVERAGEIF AVERAGEIFS
"Which sales rep is #1?"
RANK.EQ for the rank, LARGE for the biggest sale itself, INDEX+MATCH+MAX for the rep name behind the biggest sale.
RANK.EQ LARGE
"How spread out is my data?"
STDEV.S for a sample, STDEV.P for a full population. IQR = QUARTILE.INC(x, 3) − QUARTILE.INC(x, 1) for outlier-resistant spread.
STDEV.S QUARTILE.INC
"Are these two columns related?"
CORREL returns Pearson correlation from −1 to +1. Closer to ±1 = stronger linear relationship; near 0 = no linear relationship (could still be non-linear).
CORREL
"What's the middle value, not the average?"
MEDIAN — resistant to outliers. Prefer it over AVERAGE for salaries, home prices, response times, anything with a long tail.
MEDIAN
"Count distinct/unique values"
Classic: SUMPRODUCT(1/COUNTIF(range, range)). Excel 365: COUNTA(UNIQUE(range)).
COUNTIF UNIQUE

Related function categories

Statistical is one of Excel's function categories. If you're looking for something specific, it might live in a neighbor:

Templates that lean on statistics

These templates make heavy use of the statistical family — counting, aggregating, ranking, or benchmarking. Download any of them to see the functions in action.

Free example workbooks: Every deep-dive guide (COUNTIF, COUNTIFS, AVERAGEIF, AVERAGEIFS, MAXIFS, MINIFS) ships with a downloadable .xlsx workbook of 40+ live formulas. Practice with real data.

Skip the syntax. Ask in plain English.

The Sheets & Cells AI Add-in writes COUNTIF, AVERAGEIFS, RANK, PERCENTILE, and every other statistical pattern — right inside Excel. Type "average sales by region excluding outliers" and get the working formula, ready to paste.

Try the AI Add-in →