
Image by Editor
Excel’s statistical analysis goes far beyond basic formulas like AVERAGE and SUM. Excel offers powerful statistical functions to analyze variability, relationships, distributions, and trends without needing specialized statistical software. In this tutorial, we present advanced Excel formulas for statistical analysis. These functions enable sophisticated analysis that helps you uncover patterns, test hypotheses, and make data-driven decisions.
We’ll use a sales dataset to demonstrate these advanced Excel formulas for statistical analysis. Convert the data into a table (CTRL+T) for cleaner formatting and dynamic analysis.
1. Measuring Variability with STDEV and VAR
The STDEV.P and STDEV.S functions measure variability. Use STDEV.P when analyzing an entire population and STDEV.S for sample data. Pair these with VAR.P or VAR.S to calculate variance, which shows how far your data points deviate from the mean.
Average values can hide how spread out your data is — that’s where standard deviation and variance matter.
Standard Deviation (Sample):
=STDEV.S(SalesData[Revenue])
Variance (Sample):
=VAR.S(SalesData[Revenue])
Coefficient of Variation (CV):
- A scale-free measure: standard deviation relative to the mean
=STDEV.S(SalesData[Revenue]) / AVERAGE(SalesData[Revenue])

Two months can have the same average sales but very different risk profiles. A higher standard deviation means less predictable performance, which is critical for forecasting and budgeting.
2. Understanding Distribution with MEDIAN, TRIMMEAN, and PERCENTILE
When data is skewed, the average can be misleading. Before diving into analysis, understand how your data is distributed. The MEDIAN and PERCENTILE.INC functions reveal the central tendency and spread of your dataset.
Median (resists outliers):
=MEDIAN(SalesData[Revenue])
Trimmed Mean (drops extremes):
- Drop 10% of extreme values (5% low + 5% high)
=TRIMMEAN(SalesData[Revenue],0.1)
Percentile:
- 5th percentile of Revenue
=PERCENTILE.INC(SalesData[Revenue],0.05)
This value is the point where 5% of revenues are at or below it.
- 95th percentile of Revenue
=PERCENTILE.INC(SalesData[Revenue],0.95)
This value is the point where 95% of revenues are at or below it.
Interpretation:
- Median shows the typical value
- Trimmed mean drops extreme values
- Percentiles show lower and upper cutoffs

These are especially useful in income analysis, exam scores, and performance metrics.
3. Conditional Statistics with AVERAGEIFS and COUNTIFS
The COUNTIFS, SUMIFS, and AVERAGEIFS functions apply multiple criteria simultaneously.
AVERAGEIFS (statistical averages with one or more conditions):
- Average sales when rating ≥ 4.7
=AVERAGEIFS(C2:C11,E2:E11,">=4.7")
This formula calculates the average of column C where the rating in column E is greater than or equal to 4.7.
This helps isolate high-performance segments, such as months with excellent customer satisfaction.
COUNTIFS for statistical counting (distribution + conditions):
- Count orders by Region and Product (multi-criteria frequency)
=COUNTIFS(SalesData[Region],"East",SalesData[Product],"Alpha")
This formula creates a quick frequency table without a PivotTable.
AGGREGATE:
The AGGREGATE function provides 19 different statistical operations while allowing you to ignore hidden rows, error values, or nested subtotals.
Syntax:
=AGGREGATE(function_num, options, ref1)
This function gives you flexibility in how calculations handle special cases.
Top-k threshold (3rd highest revenue):
- 3rd largest Revenue (ignore hidden + errors)
=AGGREGATE(14,7,SalesData[Revenue],3)
Here, 14 refers to the LARGE function and 7 means “ignore hidden rows and errors.” You can perform “Top 3” analysis without sorting.

4. Measuring Relationships with CORREL and COVARIANCE
The CORREL function measures the strength and direction of the linear relationship between two variables.
To understand whether two variables move together, correlation is essential.
Correlation between Units and Revenue:
=CORREL(SalesData[Units], SalesData[Revenue])
This formula returns a value between −1 and 1, where values near 1 indicate strong positive correlation, values near −1 indicate strong negative correlation, and values near 0 indicate no linear relationship.
Covariance (sample):
=COVARIANCE.S(SalesData[Units], SalesData[Revenue])
Sample covariance measures how two variables move together in your dataset.
- If it’s positive: when X increases, Y tends to increase (move in the same direction)
- If it’s negative: when X increases, Y tends to decrease (move in opposite directions)
- If it’s near 0: no clear linear co-movement

This is widely used in marketing analytics, finance, and research studies.
5. Statistical Hypothesis Testing: T.TEST
The T.TEST function performs Student’s t-tests to determine whether two samples have significantly different means. Here, tails specifies one- or two-tailed tests, and type indicates whether samples are paired, have equal variance, or have unequal variance. A p-value below 0.05 typically suggests statistical significance.
A/B comparison: Example (East vs. West Revenue)
- Create two filtered ranges using the FILTER function
=FILTER(SalesData[Revenue], SalesData[Region]="East")
=FILTER(SalesData[Revenue], SalesData[Region]="West")
Now run a two-sample t-test (unequal variance is common in practice):
=T.TEST(K2#, L2#, 2, 3)
- 2 = two-tailed
- 3 = two-sample unequal variance (Welch)
If the p-value < 0.05, the difference is statistically significant (a typical threshold).

The CHISQ.TEST function tests whether observed frequencies differ significantly from expected frequencies—useful for categorical data (for example, testing whether customer preferences differ across regions).
6. Regression Analysis: Forecasting and Trend Analysis
Regression models how one variable changes with another. LINEST estimates the regression coefficients (slope and intercept) and, if requested, returns additional statistics (standard errors, R-squared, etc.). TREND uses the regression line to predict values (forecast Y from X).
For non-linear relationships, LOGEST performs exponential regression, which is useful when data grows exponentially rather than linearly.
LINEST: Get slope, intercept, and regression stats
=LINEST(SalesData[Revenue], SalesData[Units], TRUE, TRUE)
Excel’s LINEST returns an array of regression statistics when stats is TRUE. For simple linear regression, it spills a 5-row × 2-column array:
- Row 1: slope, intercept
- Row 2: SE(slope), SE(intercept)
- Row 3: R², standard error of y (sᵧ)
- Row 4: F statistic, df (degrees of freedom)
- Row 5: SSreg, SSresid
Interpretation:
- Slope (m): expected change in Revenue per +1 Unit (in your currency)
- Intercept (b): predicted Revenue when Units = 0 (sometimes not meaningful for business use, but part of the model)
- R²: fraction of Revenue variation explained by Units (0 to 1). Higher = stronger linear fit
- Standard error of y: typical prediction error size (how far points are from the line)
- F and df: overall significance test of the regression

This approach is especially useful when the Data Analysis ToolPak is unavailable.
TREND: Predict Revenue for a given X value
- Predict Revenue for Units = 12
=TREND(SalesData[Revenue], SalesData[Units], 12, TRUE)
This returns the predicted Y using the best-fit line based on historical data.

7. Detecting Outliers with Z-Scores
Detecting outliers is crucial, as they can significantly distort analysis if left unaddressed. A z-score tells you how far a value is from the mean in standard deviation units.
Add a z-score column for Revenue:
=LET(x,SalesData[Revenue], (SalesData[Revenue]-AVERAGE(x))/STDEV.S(x))
This calculates each row’s Revenue distance from the overall mean, scaled by the sample standard deviation.

Flag outliers using a threshold:
- Flag extreme values (e.g., |z| ≥ 2.5)
=IF(ABS(K2#)>=2.5,"Outlier","OK")
If you prefer a stricter rule, change 2.5 to 3.

This method is common in quality control, finance, and scientific research.
8. Probability & Distribution Functions (Normal, t, and Percentiles)
The NORM.DIST function calculates probabilities for normally distributed data. Use TRUE for cumulative probability or FALSE for probability density. This helps estimate the likelihood of specific outcomes.
Probability a value is below a threshold (Normal model):
If Revenue is “roughly normal” (often not perfect, but still useful):
=NORM.DIST(250, AVERAGE(SalesData[Revenue]), STDEV.S(SalesData[Revenue]), TRUE)
Find the 90th percentile under a normal assumption:
=NORM.INV(0.9, AVERAGE(SalesData[Revenue]), STDEV.S(SalesData[Revenue]))

When to Use Advanced Excel Statistics
Advanced formulas are most valuable when:
- Data is skewed or segmented
- You need relationships, not totals
- Decisions depend on risk, variability, or ranking
- You want insights without moving to R or Python
Conclusion
This tutorial has shown advanced Excel formulas for statistical analysis beyond the AVERAGE and SUM functions. AVERAGE and SUM are just the starting point. Functions like STDEV.S, CORREL, LINEST, and PERCENTILE.INC allow Excel to act as a lightweight statistical analysis platform. Practice with real datasets, understand the assumptions behind each test, and you’ll unlock insights that basic functions cannot provide. Mastering these formulas enables deeper insights, better decisions, and more professional analysis — directly inside Excel.

Ms Shamina, thank you so much for sharing with us! One related question, please: are there similar tools into the Google’s world (google sheets)? Could you indicate any article (sources) in order to get similar results from Google environment?
Many thanks again! 🙂