STDEV(), STDEV.S(), and STDEV.P() can be used to calculate standard deviation in Excel. It depends on if you are calculating sample or population standard deviation.
Sample Standard Deviation:
Use either STDEV() or STDEV.S().
Population Standard Deviation:
Use STDEV.P().
Example 1
The following is a sample of 6 students. You can use =STDEV(B2:B7) to calculate the sample standard deviation, which is 6.15.
![Calculating sample standard deviation using STDEV() in Excel](https://tidystat.com/wp-content/uploads/2023/01/image-7.png)
Example 2
Example 2 uses =STDEV.S(B2:B7) to calculate sample standard deviation. As expected, the result is 6.15, which is the same as in Example 1.
![Calculating sample standard deviation using STDEV.S() in Excel](https://tidystat.com/wp-content/uploads/2023/01/image-8.png)
Example 3
Suppose that a whole population is a group of 11 students. Thus, we need to calculate the population standard deviation by using =STDEV.P(B2:B12).
![Calculating population standard deviation using STDEV.P() in Excel](https://tidystat.com/wp-content/uploads/2023/01/image-10.png)