Python Statistical Functions for Excel
July 9, 2025
We are excited to announce the availability of Python-powered statistical functions for Excel users. Our goal is to bring the full power of Python’s scipy.stats library directly into your spreadsheets, enabling advanced analytics and statistical modeling that goes beyond what native Excel functions provide. Initially we are providing only a subset of continuous distributions, but we plan to support all of the probablility distributions available in scipy.stats
in the near future as well as hypothesis testing, and other advanced statistical methods.
Why Use Python Statistical Functions in Excel?
While Excel offers a range of built-in statistical functions, they are often limited in scope. Many distributions are missing, and even for supported distributions, Excel typically only provides basic PDF, CDF, or quantile calculations. In contrast, our Python functions offer:
- Full distribution support (PDF, CDF, inverse CDF, survival, inverse survival)
- Comprehensive statistics (mean, median, variance, standard deviation)
- Flexible parameterization (location and scale for all distributions)
- Access to distributions not available in Excel
Comparison Table: Python vs. Native Excel Functions
Excel Python Function | Native Excel Function(s) | Key Differences |
---|---|---|
BETA | BETA.DIST, BETA.INV | Python adds survival, inverse survival, full stats, and location/scale parameters. |
CAUCHY | — | Not available in Excel; Python provides full distribution and stats. |
CHISQ | CHISQ.DIST, CHISQ.INV | Python adds survival, inverse survival, full stats, and location/scale parameters. |
EXPON | EXPON.DIST | Python adds quantile, survival, inverse survival, full stats, and location/scale. |
F_DIST | F.DIST, F.INV | Python adds survival, inverse survival, full stats, and location/scale parameters. |
GAMMA | GAMMA.DIST, GAMMA.INV | Python adds survival, inverse survival, full stats, and location/scale parameters. |
LAPLACE | — | Not available in Excel; Python provides full distribution and stats. |
LOGNORM | LOGNORM.DIST, LOGNORM.INV | Python adds survival, inverse survival, full stats, and location/scale parameters. |
NORM | NORM.DIST, NORM.INV | Python adds survival, inverse survival, full stats, and location/scale parameters. |
PARETO | — | Not available in Excel; Python provides full distribution and stats. |
T_DIST | T.DIST, T.DIST.2T, T.DIST.RT, T.INV, T.INV.2T | Python adds survival, inverse survival, full stats, and location/scale parameters. |
UNIFORM | RAND, RANDBETWEEN | Python provides full distribution (PDF, CDF, quantile, etc.) and stats, not available in Excel. |
WEIBULL_MIN | WEIBULL.DIST | Python adds quantile, survival, inverse survival, full stats, and location/scale. |
Legend:
- PDF: Probability Density Function
- CDF: Cumulative Distribution Function
- Quantile: Inverse CDF
- Survival: Survival Function (1 - CDF)
- Stats: Mean, Median, Variance, Standard Deviation
Example: Using Python Functions in Excel
Suppose you want to compute the inverse CDF (quantile) for the Weibull distribution, which is not available in native Excel. With the new Python function, you can simply use:
=WEIBULL_MIN(0.95, 1.5, 0, 1, "icdf")
Similarly, for distributions not available in Excel at all (like Pareto or Cauchy), you can now perform advanced statistical analysis directly in your spreadsheet.
Getting Started
To use these functions, add them from the list of Example Functions in our Python for Excel add-in. Then, simply call the functions as you would any Excel formula.
You can see the full list of available functions in our Python Functions Repository.