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.

Excel Statistical Functions

FunctionDescription
AVEDEVReturns the average of the absolute deviations of data points from their mean
AVERAGEReturns the average of its arguments
AVERAGEAReturns the average of its arguments, including numbers, text, and logical values
AVERAGEIFReturns the average (arithmetic mean) of all the cells in a range that meet a given criteria
AVERAGEIFSReturns the average (arithmetic mean) of all cells that meet multiple criteria
BETA.DISTReturns the beta cumulative distribution function
BETA.INVReturns the inverse of the cumulative distribution function for a specified beta distribution
BINOM.DISTReturns the individual term binomial distribution probability
BINOM.DIST.RANGEReturns the probability of a trial result using a binomial distribution
BINOM.INVReturns the smallest value for which the cumulative binomial distribution is less than or equal to a criterion value
CHISQ.DISTReturns the cumulative beta probability density function
CHISQ.DIST.RTReturns the one-tailed probability of the chi-squared distribution
CHISQ.INVReturns the cumulative beta probability density function
CHISQ.INV.RTReturns the inverse of the one-tailed probability of the chi-squared distribution
CHISQ.TESTReturns the test for independence
CONFIDENCE.NORMReturns the confidence interval for a population mean
CONFIDENCE.TReturns the confidence interval for a population mean, using a Student’s t distribution
CORRELReturns the correlation coefficient between two data sets
COUNTCounts how many numbers are in the list of arguments
COUNTACounts how many values are in the list of arguments
COUNTBLANKCounts the number of blank cells within a range
COUNTIFCounts the number of cells within a range that meet the given criteria
COUNTIFSCounts the number of cells within a range that meet multiple criteria
COVARIANCE.PReturns covariance, the average of the products of paired deviations
COVARIANCE.SReturns the sample covariance, the average of the products deviations for each data point pair in two data sets
DEVSQReturns the sum of squares of deviations
EXPON.DISTReturns the exponential distribution
F.DISTReturns the F probability distribution
F.DIST.RTReturns the F probability distribution
F.INVReturns the inverse of the F probability distribution
F.INV.RTReturns the inverse of the F probability distribution
F.TESTReturns the result of an F-test
FISHERReturns the Fisher transformation
FISHERINVReturns the inverse of the Fisher transformation
FORECASTReturns a value along a linear trend
FORECAST.ETSReturns a future value based on existing (historical) values by using the AAA version of the Exponential Smoothing (ETS) algorithm
FORECAST.ETS.CONFINTReturns a confidence interval for the forecast value at the specified target date
FORECAST.ETS.SEASONALITYReturns the length of the repetitive pattern Excel detects for the specified time series
FORECAST.ETS.STATReturns a statistical value as a result of time series forecasting
FORECAST.LINEARReturns a future value based on existing values
FREQUENCYReturns a frequency distribution as a vertical array
GAMMAReturns the gamma function value
GAMMA.DISTReturns the gamma distribution
GAMMA.INVReturns the inverse of the gamma cumulative distribution
GAMMALNReturns the natural logarithm of the gamma function, Γ(x)
GAMMALN.PRECISEReturns the natural logarithm of the gamma function, Γ(x)
GAUSSReturns 0.5 less than the standard normal cumulative distribution
GEOMEANReturns the geometric mean
GROWTHReturns values along an exponential trend
HARMEANReturns the harmonic mean
HYPGEOM.DISTReturns the hypergeometric distribution
INTERCEPTReturns the intercept of the linear regression line
KURTReturns the kurtosis of a data set
LARGEReturns the k-th largest value in a data set
LINESTReturns the parameters of a linear trend
LOGESTReturns the parameters of an exponential trend
LOGNORM.DISTReturns the cumulative lognormal distribution
LOGNORM.INVReturns the inverse of the lognormal cumulative distribution
MAXReturns the maximum value in a list of arguments
MAXAReturns the maximum value in a list of arguments, including numbers, text, and logical values
MAXIFSReturns the maximum value among cells specified by a given set of conditions or criteria
MEDIANReturns the median of the given numbers
MINReturns the minimum value in a list of arguments
MINIFSReturns the minimum value among cells specified by a given set of conditions or criteria.
MINAReturns the smallest value in a list of arguments, including numbers, text, and logical values
MODE.MULTReturns a vertical array of the most frequently occurring, or repetitive values in an array or range of data
MODE.SNGLReturns the most common value in a data set
NEGBINOM.DISTReturns the negative binomial distribution
NORM.DISTReturns the normal cumulative distribution
NORM.INVReturns the inverse of the normal cumulative distribution
NORM.S.DISTReturns the standard normal cumulative distribution
NORM.S.INVReturns the inverse of the standard normal cumulative distribution
PEARSONReturns the Pearson product moment correlation coefficient
PERCENTILE.EXCReturns the k-th percentile of values in a range, where k is in the range 0 to 1, exclusive.
PERCENTILE.INCReturns the k-th percentile of values in a range
PERCENTRANK.EXCReturns the rank of a value in a data set as a percentage (0 to 1, exclusive) of the data set
PERCENTRANK.INCReturns the percentage rank of a value in a data set
PERMUTReturns the number of permutations for a given number of objects
PERMUTATIONAReturns the number of permutations for a given number of objects (with repetitions) that can be selected from the total objects
PHIReturns the value of the density function for a standard normal distribution
POISSON.DISTReturns the Poisson distribution
PROBReturns the probability that values in a range are between two limits
QUARTILE.EXCReturns the quartile of the data set, based on percentile values from 0 to 1, exclusive
QUARTILE.INCReturns the quartile of a data set
RANK.AVGReturns the rank of a number in a list of numbers
RANK.EQReturns the rank of a number in a list of numbers
RSQReturns the square of the Pearson product moment correlation coefficient
SKEWReturns the skewness of a distribution
SKEW.PReturns the skewness of a distribution based on a population: a characterization of the degree of asymmetry of a distribution around its mean
SLOPEReturns the slope of the linear regression line
SMALLReturns the k-th smallest value in a data set
STANDARDIZEReturns a normalized value
STDEV.PCalculates standard deviation based on the entire population
STDEV.SEstimates standard deviation based on a sample
STDEVAEstimates standard deviation based on a sample, including numbers, text, and logical values
STDEVPACalculates standard deviation based on the entire population, including numbers, text, and logical values
STEYXReturns the standard error of the predicted y-value for each x in the regression
T.DISTReturns the Percentage Points (probability) for the Student t-distribution
T.DIST.2TReturns the Percentage Points (probability) for the Student t-distribution
T.DIST.RTReturns the Student’s t-distribution
T.INVReturns the t-value of the Student’s t-distribution as a function of the probability and the degrees of freedom
T.INV.2TReturns the inverse of the Student’s t-distribution
T.TESTReturns the probability associated with a Student’s t-test
TRENDReturns values along a linear trend
TRIMMEANReturns the mean of the interior of a data set
VAR.PCalculates variance based on the entire population
VAR.SEstimates variance based on a sample
VARAEstimates variance based on a sample, including numbers, text, and logical values
VARPACalculates variance based on the entire population, including numbers, text, and logical values
WEIBULL.DISTReturns the Weibull distribution
Z.TESTReturns the one-tailed probability-value of a z-test
Last updated on