The first time I needed a real t-test for work, I had a spreadsheet, a deadline, and a vague memory that Excel could "do statistics" somewhere in a menu I'd never opened.
Turns out it can do a lot. Once you switch on the Analysis ToolPak, Excel runs descriptive statistics, t-tests, ANOVA, correlation, regression, and histograms without a single plugin or line of code.
I ran every one of those tests on the same small sales dataset so you can follow along with one example the whole way through. By the end you'll enable the ToolPak on Windows or Mac, know the core formulas worth memorizing, run six real tests, read what each output table is telling you, and spot the point where Excel stops being the right tool for the job.
Enable the Analysis ToolPak (Windows and Mac)
Most of Excel's heavier statistics live in a free add-in called the Analysis ToolPak. It ships with Excel, but it's off by default, so step one is turning it on. The path is a little different depending on your machine.
On Windows
- Click File, then Options at the bottom of the menu.
- In the Excel Options window, click Add-ins in the left sidebar.
- At the bottom, next to Manage, choose Excel Add-ins and click Go.
- Check the box for Analysis ToolPak and click OK.
- Open the Data tab. You'll see a new Data Analysis button on the far right.
[Screenshot: Excel Options β Add-ins β Manage: Excel Add-ins β Go] [Screenshot: Data tab showing the Data Analysis button]
On Mac
- In the top menu, click Tools, then Excel Add-ins.
- Check the box for Analysis ToolPak and click OK.
- Open the Data tab, where Data Analysis now appears.
[Screenshot: Mac Tools menu β Excel Add-ins dialog]
π‘ Tip: If Data Analysis doesn't show up right away, quit Excel and reopen it. The button almost always appears after a restart. This works in current versions, including Microsoft 365, Excel 2024, and Excel 2021 on both Windows and Mac.
The core Excel formulas for statistical analysis
Before the ToolPak tests, it helps to know the handful of formulas you'll type by hand all the time. These cover the basics of descriptive statistics, the summary numbers that describe a single column of data. (The ToolPak tests further down handle inferential work, where you're comparing groups or predicting an outcome. If you want the full split, here's a primer on the types of statistical analysis.)
Here are the ones worth committing to memory:
| Function | What it calculates | Example |
| AVERAGE | The mean of a range | =AVERAGE(B2:B50) |
| MEDIAN | The middle value, which shrugs off outliers | =MEDIAN(B2:B50) |
| MODE.SNGL | The most frequent value | =MODE.SNGL(B2:B50) |
| STDEV.S / STDEV.P | Standard deviation for a sample vs. a full population | =STDEV.S(B2:B50) |
| VAR.S | Variance for a sample | =VAR.S(B2:B50) |
| CORREL | The correlation between two ranges, from β1 to +1 | =CORREL(B2:B50, C2:C50) |
| T.TEST | A p-value comparing two sets of numbers | =T.TEST(B2:B50, C2:C50, 2, 2) |
Two quick notes. Use STDEV.S when your data is a sample and STDEV.P only when you genuinely have every data point in the population (rare in business). And T.TEST's last two arguments set the tails (1 or 2) and the test type (1 paired, 2 equal-variance, 3 unequal-variance), which lines up with the ToolPak t-tests below.
A few others earn their keep once you're comfortable: RANK.EQ for ranking values, PERCENTILE.INC for percentiles, and FREQUENCY for counting values across ranges.
Meet the sample dataset
Every test below runs on the same small table, so you can see how one dataset flows through all of them. Picture a year of monthly figures for two stores:
- Month: Jan through Dec
- Store: A or B
- Marketing spend: the dollars spent that month
- Foot traffic: people who walked in
- Total sales: the dollars that came back out
[Screenshot: the sample sales table with Month, Store, Marketing Spend, Foot Traffic, and Total Sales columns]
That gives us a numeric column to describe (Total Sales), two groups to compare (Store A vs. Store B), and a few variables that might predict sales. Plenty to work with.
Run the main statistical tests with the Analysis ToolPak (step by step)
With the ToolPak on, every test starts the same way: open the Data tab, click Data Analysis, pick a test from the list, and point it at your data. Here are the six you'll reach for most, including how to read each one. The worked examples below mirror the kind of walkthrough in this Texas Tech data analysis handout, which runs similar tests on a single sample dataset.
Descriptive Statistics
Start here when you want a fast profile of one column, like Total Sales.
- Data β Data Analysis β Descriptive Statistics.
- Set the Input Range to your Total Sales column.
- Check Labels in First Row and Summary Statistics, then click OK.
Excel drops a tidy table: Mean, Standard Error, Median, Mode, Standard Deviation, Sample Variance, Kurtosis, Skewness, Range, Minimum, Maximum, Sum, and Count.
π‘ How to read it: if the mean sits well above the median, your data is right-skewed, usually a sign that a few big months are pulling the average up. The standard deviation tells you how spread out the months are around that average.
t-Test (and which of the three to pick)
A t-test asks whether two groups really differ or whether the difference is just noise. Comparing Store A's sales to Store B's is a classic case. The ToolPak gives you three versions, and picking the right one matters:
- Paired Two Sample for Means: use it when the two columns are the same subjects measured twice, like each store before and after a promotion.
- Two-Sample Assuming Equal Variances: use it for two separate groups whose spread looks similar.
- Two-Sample Assuming Unequal Variances: use it for two separate groups whose spread looks different. When you're unsure, this is the safe default.
Run it from Data Analysis, set each group as an input range, and read the P(T<=t) two-tail value. Below 0.05 means the difference is statistically significant. For a one-off check, the =T.TEST() formula gives you the same p-value in a single cell.
ANOVA: Single Factor
When you've got three or more groups to compare at once, a stack of t-tests gets messy. ANOVA handles them in one shot.
- Data β Data Analysis β Anova: Single Factor.
- Set the Input Range to your grouped columns and click OK.
Look at the F value, the P-value, and F crit. A P-value under 0.05 says at least one group mean is different from the others. ANOVA won't tell you which one, so that's your cue to follow up with targeted t-tests.
Correlation
Correlation measures how two variables move together, like Marketing Spend and Total Sales.
- Data β Data Analysis β Correlation.
- Set the Input Range across both columns, check Labels in First Row, and click OK.
You get a correlation matrix. Values near +1 move together strongly, values near β1 move in opposite directions, and values near 0 barely relate at all. One honest caveat: correlation isn't causation. A high number between spend and sales is a lead worth testing before you assume one caused the other.
Regression
Regression goes a step further and tries to predict an outcome. Say you want to predict Total Sales from Marketing Spend and Foot Traffic.
- Data β Data Analysis β Regression.
- Set the Input Y Range to the thing you're predicting (Total Sales).
- Set the Input X Range to your predictors (Marketing Spend and Foot Traffic).
- Check Labels and Confidence Level, then click OK.
The output has three numbers to watch. R Square tells you how much of the variation the model explains, on a 0-to-1 scale (an R Square of 0.83 means roughly 83% of the variation is accounted for). The coefficients give you the prediction equation. And the P-value for each variable flags whether it's a real predictor, with anything under 0.05 worth keeping.
Histogram
A histogram shows how one variable is distributed, which is the quickest way to see skew or outliers.
- Set up a column of bin values (the buckets you want to group into).
- Data β Data Analysis β Histogram.
- Set the Input Range and Bin Range, check Chart Output, and click OK.
Excel returns a frequency table and a bar chart. Tall bars on the left with a long tail to the right confirm the right-skew the descriptive stats hinted at.
[Screenshot: a histogram output showing frequency by bin] [Screen recording / GIF placeholder: running a ToolPak test end to end]
Other built-in ways to analyze data in Excel (PivotTables and What-If)
The ToolPak isn't the only statistical muscle Excel has. Two built-in features do real analytical work before you ever open an add-in.
PivotTables are the fastest way to summarize and segment a big table. Drag Store to rows, Month to columns, and Total Sales to values, and you've got average sales by store and month in seconds. It's the workhorse most analysts reach for first, and it pairs well with the charting side of analyzing and visualizing data with Excel.
What-If analysis lets you model and project outcomes. Scenarios compare best-case and worst-case versions of a model, Goal Seek back-solves an input to hit a target, and Data Tables show how one or two variables swing a result. If you want the deeper version of this idea, here's a guide to what a sensitivity analysis is.
Is Excel statistical software?
Yes, up to a point. With the Analysis ToolPak on, Excel runs the mainstream tests most people need, descriptive statistics, t-tests, ANOVA, correlation, and regression, so for everyday analysis it behaves like light statistical software. For a marketer, finance analyst, or ops lead with a few thousand rows, it's often all you need.
It isn't a dedicated statistics package, though, and the limits show up fast:
- The results are static: a ToolPak output doesn't update when your data changes. Edit a number and you have to rerun the whole test, unlike a live formula.
- Non-parametric tests are thin: if your data breaks the usual assumptions, Excel's built-in options run out quickly.
- There's a hard size ceiling: a worksheet tops out at 1,048,576 rows, and performance drags well before that (here's how many rows Excel can handle in detail).
- There's no real audit trail: reproducing exactly what you did last quarter is tough.
So when should you move on? For large datasets, repeatable pipelines, or heavier non-parametric work, R and Python are built for it, and SPSS gives you point-and-click power without code. If you'd rather stay inside Excel, add-ins like StatTools or XLSTAT bolt extra tests onto the ToolPak. And an AI data analyst can cover a lot of the same ground without the setup.
Skip the setup: run the same analysis from a plain-English question
Excel and the ToolPak get the job done, but reopening the dialog every time your data changes, or hunting for a test Excel doesn't ship, gets old. That's exactly what we built Julius for.
Julius is an AI data analyst. You ask for the test you want in plain English, and it runs the analysis and builds the chart, no ToolPak, no formula memorizing.
Here's how Julius helps:
- Ask in plain English: upload your .xlsx or connect a source like PostgreSQL, Snowflake, or BigQuery, then ask for a t-test, a regression, or a chart in one sentence.
- It retries and iterates: Julius works in a sandbox that catches and fixes its own errors before handing back an answer.
- Results refresh and export: get the output plus a chart you can share or export, and rerun it when the numbers change.
- Repeatable with Scheduled runs: save an analysis once and run next monthβs data through the same steps
Ready to skip the spreadsheet and go straight to the insight? Try Julius for free today.
Frequently asked questions
Can ChatGPT analyze Excel data?
ChatGPT can analyze Excel data to a point: it reads a pasted table or an uploaded file and runs light analysis, but it struggles with large files and repeatable workflows. For real statistics on business-sized data, the Analysis ToolPak or a dedicated AI data analyst is more reliable.
Is the Analysis ToolPak free?
The Analysis ToolPak is free. It comes built into Excel at no extra cost; you just enable it through the Add-ins menu, as shown in the steps above.
Does Excel have a t-test function?
Excel has t-test options in two places. The T.TEST formula returns a p-value in a single cell, and the Analysis ToolPak adds three menu-driven versions: Paired, Two-Sample Assuming Equal Variances, and Two-Sample Assuming Unequal Variances.
What's the difference between STDEV.S and STDEV.P?
STDEV.S calculates standard deviation for a sample, while STDEV.P calculates it for an entire population. Use STDEV.S unless you truly have every data point, since most real datasets are samples.
Is Excel good enough for statistical analysis?
Excel is good enough for most everyday descriptive and inferential tests, especially with the ToolPak on. For very large datasets, non-parametric tests, or repeatable pipelines, step up to R, Python, SPSS, or an AI data analyst.