Skip to Content

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 FunctionNative Excel Function(s)Key Differences
BETABETA.DIST, BETA.INVPython adds survival, inverse survival, full stats, and location/scale parameters.
CAUCHYNot available in Excel; Python provides full distribution and stats.
CHISQCHISQ.DIST, CHISQ.INVPython adds survival, inverse survival, full stats, and location/scale parameters.
EXPONEXPON.DISTPython adds quantile, survival, inverse survival, full stats, and location/scale.
F_DISTF.DIST, F.INVPython adds survival, inverse survival, full stats, and location/scale parameters.
GAMMAGAMMA.DIST, GAMMA.INVPython adds survival, inverse survival, full stats, and location/scale parameters.
LAPLACENot available in Excel; Python provides full distribution and stats.
LOGNORMLOGNORM.DIST, LOGNORM.INVPython adds survival, inverse survival, full stats, and location/scale parameters.
NORMNORM.DIST, NORM.INVPython adds survival, inverse survival, full stats, and location/scale parameters.
PARETONot available in Excel; Python provides full distribution and stats.
T_DISTT.DIST, T.DIST.2T, T.DIST.RT, T.INV, T.INV.2TPython adds survival, inverse survival, full stats, and location/scale parameters.
UNIFORMRAND, RANDBETWEENPython provides full distribution (PDF, CDF, quantile, etc.) and stats, not available in Excel.
WEIBULL_MINWEIBULL.DISTPython 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.

Last updated on