Excel has a function for almost every common statistic, and you only need a handful of them to summarise a dataset properly: AVERAGE and MEDIAN for the centre, STDEV.S for spread, COUNT and COUNTIF for how much data you actually have, CORREL for relationships, and the Analysis ToolPak for regression and histograms. The steps below walk through building a small statistics worksheet from scratch, then check the results against Excel's built-in analysis tools so you can trust the numbers. Nothing needs installing to start; every function listed here is part of standard Excel on Windows, Mac and the web, though menu labels can differ slightly by version, device or region.

What You'll Need

  • Excel for Microsoft 365, Excel 2021 or later, or Excel for the web. Older perpetual versions have the same core functions but may lack newer dynamic-array behaviour.
  • A data table with one header row and one row per observation, with no blank rows in the middle. For example, columns for Region, Month, Units Sold and Order Value.
  • Numeric data stored as numbers, not text. Numbers aligned to the left of a cell are usually text, which breaks every statistic silently.
  • Optional: the Analysis ToolPak, a free Excel add-in for descriptive statistics, histograms and regression. On Windows go to File > Options > Add-ins, choose Excel Add-ins at the bottom and tick Analysis ToolPak. On Mac look for Tools > Excel Add-ins. Labels vary by version.

Step-by-Step

  1. Set up a clean data range. Put each variable in its own column with a single header cell above it. Avoid merged cells, subtotal rows and totals inside the data range; they double-count your figures. If you plan to grow the table, select it and use Formulas > Define Name to give the range a name such as Sales, or convert it to a table with Ctrl+T so ranges expand automatically.
  2. Confirm the data is numeric. Click a value and look at the status bar at the bottom of the window; it shows Average, Count and Sum for selected numeric cells. If the status bar shows only Count, those cells are text. Convert with Data > Text to Columns, or multiply by 1 in an empty cell and paste the result back as values. Watch for numbers typed with a leading apostrophe.
  3. Count your observations first. In an empty area, enter =COUNT(B2:B101) to count numeric cells and =COUNTA(B2:B101) to count non-empty cells. If the two differ, some entries are text or errors. Add =COUNTBLANK(B2:B101) to see gaps. Knowing n before you compute anything is the fastest way to catch a broken range.
  4. Calculate the central tendency. Use =AVERAGE(B2:B101) for the mean, =MEDIAN(B2:B101) for the middle value, and check =MODE.SNGL(B2:B101) for the most frequent value. Compare mean and median: if the mean is much larger, you probably have outliers or a skewed distribution, and the median is the fairer summary to quote.
  5. Add the spread statistics. =STDEV.S(B2:B101) gives the sample standard deviation and =STDEV.P(B2:B101) the population version; use the sample version unless you genuinely have every member of the population. Pair it with =MIN, =MAX, =MAX(B2:B101)-MIN(B2:B101) for the range, and =QUARTILE.INC(B2:B101,1) and QUARTILE.INC(B2:B101,3) so you can state the interquartile range.
  6. Compute a coefficient of variation when you compare spread across different units: =STDEV.S(B2:B101)/AVERAGE(B2:B101). Format the cell as a percentage to make it readable. This is the only way to sensibly compare variability of, say, prices and unit counts.
  7. Count and sum by category. Use =COUNTIF(A2:A101,"North") for one criterion or =COUNTIFS(A2:A101,"North",C2:C101,">1000") for several. Match with =SUMIFS(C2:C101,A2:A101,"North") and =AVERAGEIFS(C2:C101,A2:A101,"North"). Use wildcards like "Nor*" carefully, and remember SUMIFS puts the sum range first while COUNTIFS lists criteria ranges first.
  8. Test relationships between two numeric columns. =CORREL(B2:B101,C2:C101) returns the correlation coefficient between -1 and 1. Square it for the proportion of variance shared. Correlation does not prove one variable causes the other, so phrase the finding as an association.
  9. Build a quick frequency table. List your categories in a column, then beside each put =COUNTIF($A$2:$A$101,D2) and copy down with absolute references. Turn it into shares with =COUNTIF($A$2:$A$101,D2)/COUNTA($A$2:$A$101) formatted as a percentage.
  10. Cross-check with the Analysis ToolPak. With data selected, go to Data > Data Analysis > Descriptive Statistics and choose your input range with the Labels in first row box ticked. Ask for Summary statistics. You get mean, median, mode, standard deviation, variance, kurtosis, skewness, range, minimum, maximum and count in one block. Compare these to your formulas; they should match. If they do not, your formula range is wrong.
  11. Format and document. Round display to sensible decimal places with Format Cells rather than ROUND, so the underlying value stays exact. Next to each result, type a plain-language label such as "Mean order value, all regions". Anyone rereading the sheet later, including you, will need to know which range produced the figure.

Common Mistakes

The most frequent error is selecting a range that includes the header, or a total row, which drags the mean and standard deviation off. Always check the range highlight closes on the last data row. Second, choosing STDEV.P when the data is a sample understates the spread and makes results look tighter than they are; use STDEV.S by default. Third, ignoring text-stored numbers: COUNT returns a smaller figure than you expect and AVERAGE quietly skips those cells. Fourth, dividing by a COUNT that includes blanks or text, producing an inflated denominator; COUNTA counts non-empty cells, which may include error values. Fifth, using AVERAGEIFS with ranges of different sizes, which returns #VALUE!. Finally, forgetting absolute references when copying COUNTIF formulas down, so every row recalculates the same first category.

Tips

Keep every statistic on one summary sheet that references the raw data sheet, so the raw data never gets edited by accident. Use =SUBTOTAL(101,B2:B101) instead of AVERAGE when the data is filtered; SUBTOTAL recalculates only visible rows while AVERAGE includes hidden ones. Wrap results in =IFERROR(AVERAGE(B2:B101),"no data") so an empty range shows a readable message rather than #DIV/0!. Try =TEXTJOIN(", ",TRUE,range) to inspect what is actually in a column when numbers look wrong. And use the Evaluate Formula tool under Formulas > Evaluate Formula to watch a stubborn formula calculate step by step.

Troubleshooting

#DIV/0! means the denominator is zero, usually because AVERAGE or STDEV is pointed at an empty range. Check the range bounds. #VALUE! in COUNTIFS or AVERAGEIFS nearly always means mismatched range sizes; select each range in turn and confirm the row counts match. A number that looks wrong with no error usually means an outlier or a stray far-down value caught by a whole-column reference such as B:B; narrow the range to the actual data. Results that stop updating suggest Calculation Options is set to Manual under Formulas; switch it back to Automatic. The Data Analysis button is missing: the add-in is not enabled, so revisit File > Options > Add-ins and tick it, restarting Excel afterwards.

Frequently Asked Questions

Should I use STDEV.S or STDEV.P?

Use STDEV.S when your data is a sample drawn from a larger group, which covers most business and survey data. Use STDEV.P only when the dataset contains every member of the population you care about.

Why does AVERAGE give a different result from my manual calculation?

AVERAGE ignores text and blank cells but includes zeros. A manual sum divided by a raw row count will differ if any cells are blank, text or zero. Compare AVERAGE with SUM divided by COUNT to see which cells are being excluded.

What is the difference between MEDIAN and AVERAGE?

AVERAGE adds every value and divides by the count, so extreme values pull it. MEDIAN is the middle value once sorted, so it barely moves when a few outliers appear. For skewed data such as incomes or house prices the median is usually the better summary.

Can I calculate statistics without the Analysis ToolPak?

Yes. AVERAGE, MEDIAN, STDEV.S, MIN, MAX, QUARTILE.INC, CORREL and the COUNTIF family cover most everyday needs. The ToolPak mainly saves time by producing whole summary tables, histograms and regression output in one dialog.

How do I ignore filtered-out rows in my statistics?

Use the SUBTOTAL function with the 100-series function numbers, such as 101 for AVERAGE and 107 for STDEV, rather than the plain functions. SUBTOTAL respects hidden rows created by filters.

Why does COUNTIF return zero when the data clearly contains matches?

Usually trailing spaces in the source data or numbers stored as text. Trim with TRIM, or convert text to numbers with Text to Columns before counting.