The Excel STDEVPA Function

Related Function:
STDEVP Function
Standard Deviation

The Standard Deviation is a statistical measure, that is used to identify the amount that a set of values differ (or deviate) from the average value.

For any set of values, the Standard Deviation is give by the square root of the variance. I.e.

Population Standard Deviation Equation

where,

  • x takes on each value in the set;
  • x is the average (statistical mean) of the set of values;
  • n is the number of values.
For further information, see the Wikipedia Standard Deviation page

Function Description

The Excel STDEVPA function calculates the standard deviation of a supplied set of values.

The syntax of the function is:

STDEVPA( number1, [number2], ... )

where the number arguments are one or more numerical values, arrays of values, or references to cells containing numbers.

If you are using a recent version of Excel (2007 or later), you can enter up to 255 number arguments to the function. However, in Excel 2003, the function can only accept up to 30 number arguments.

Note that the Stdevpa function is used when calculating the standard deviation for an entire population. If you are calculating the standard deviation of an sample population, you should use the Stdev or the Stdeva function.


STDEVPA & STDEVP Functions

The Excel Stdevpa function is very similar to the Excel Stdevp function, in that both functions calculate the standard deviation of a supplied set of values, representing an entire population.

The difference between these two functions applies when an array of values, containing text or logical values is supplied to the function. In this case, the Stdevp function ignores the text and logical values, whereas the Stdevpa function assigns the value 0 to text and the values 1 or 0 to logical values.

The rules for this are shown in the table below, compared to the rules for the Stdevp function.

STDEVP
Function
STDEVPA
Function
Logical values or text (including text representations of numbers), typed directly into the list of arguments ARE counted
(TRUE=1, FALSE=0)
ARE counted
(TRUE=1, FALSE=0)
Text that cannot be interpreted as a number, typed directly into the list of arguments #VALUE! error #VALUE! error
Logical values, within arrays or reference arguments Ignored ARE counted
(TRUE=1, FALSE=0)
Text (including empty text "", text representations of numbers, or other text), within arrays or reference arguments Ignored Counted as zero
Empty cells Ignored Ignored

See the page on Standard Deviation in Excel for a comparison of all the different Excel standard deviation functions.

Stdevpa Function Example

The following spreadsheet shows the Excel Stdevpa function used to calculate the standard deviation of the set of values in cells A1-A4 and in cells A1-A6.

 Formulas:
  A B
1 1 =STDEVPA( A1:A4 )
2 3 =STDEVPA( A1:A6 )
3 5 =STDEVPA( A1:A4, 1, 0 )
4 2  
5 TRUE  
6 text  
 Results:
  A B
1 1 1.479019946
2 3 1.632993162
3 5 1.632993162
4 2  
5 TRUE  
6 text  

Note that, in the spreadsheet above, the function in cell B2 includes the values in cells A5 and A6. In this case:

This is shown by the example in cell B3, in which cells A1 - A4 and the values 1 and 0 give the same result as the standard deviation calculation for cells A1 - A6.


For further information and examples of the Excel Stdevpa function, see the Microsoft Office website.