11/3/2020 How To Calculate P Value In Excel (Step-By-Step Tutorial)
About Products FREE EXCEL TRAINING
How to Calculate P Value in Excel
Written by cofounder Kasper Langmann, Microsoft Office Specialist. How good are you at
The pvalue, short for probability value, is an important concept in statistical
Excel?
hypothesis testing.
I have something for you.
Just tell me your skill-level...
Its use in hypothesis testing is common in many fields like finance, physics,
economics, psychology, and many others.
I'm a beginner
Knowing how to compute the probability value using Excel is a great timesaver.
I'm intermediate
In this article, we’ll show you 2 easy ways you can calculate the pvalue
in Excel.
I'm an expert
Kasper Langmann, Cofounder of Spreadsheeto
Let’s get started!
*This tutorial is for Excel 2019/Microsoft 365 (for Windows). Got a different
version? No problem, you can still follow the exact same steps.
Table of Content
https://spreadsheeto.com/p-value-excel/ 1/14
11/3/2020 How To Calculate P Value In Excel (Step-By-Step Tutorial)
Chapter 1: The concept of P Value
Chapter 2: Grab your free exercise file here!
Chapter 3: The tTest tool in the Analysis ToolPak
Chapter 4: The ‘T.TEST’ function
Chapter 5: Wrapping things up…
What are you?
Beginner
Intermediate
Expert
The concept of P Value
https://spreadsheeto.com/p-value-excel/ 2/14
11/3/2020 How To Calculate P Value In Excel (Step-By-Step Tutorial)
Basically, the pvalue is used in hypothesis testing to quantify the idea of
statistical significance of evidence.
It’s a value that can be expressed in percentage or decimal to support or reject
the null hypothesis.
In Excel, the pvalue is expressed in decimal.
But in reporting, try to use the percentage form (multiply the decimal
form by 100) as some people prefer hearing it that way like it’s a part of a
whole.
Kasper Langmann, Cofounder of Spreadsheeto
As for the results:
Significant: <=5%
Marginally significant: <=10%
Insignificant: >10%
As stated earlier, there are two ways to get the pvalue in Excel:
1. tTest tool in the analysis toolpak
2. The ‘T.TEST’ function
For this tutorial, we’ll be using the gym program data set shown below and
compute the pvalue:
https://spreadsheeto.com/p-value-excel/ 3/14
11/3/2020 How To Calculate P Value In Excel (Step-By-Step Tutorial)
Get your FREE exercise file
https://spreadsheeto.com/p-value-excel/ 4/14
11/3/2020 How To Calculate P Value In Excel (Step-By-Step Tutorial)
Before you start:
Throughout this guide, you need a data set to practice.
I’ve included one for you (for free).
Download it right below!
Download the FREE Exercise File
DOWNLOAD FREE EXERCISE
FILE
The tTest tool in the Analysis ToolPak
To use the tTest tool in the Analysis ToolPak, you have to load the toolpak first
https://spreadsheeto.com/p-value-excel/ 5/14
11/3/2020 How To Calculate P Value In Excel (Step-By-Step Tutorial)
in Excel.
Here’s a summary on how to add the analysis tool:
Click ‘File’ from the tab list
Click ‘Options’ on the bottom of the lefthand sidebar
Click ‘Addins’ on the lefthand sidebar of the window
On the bottom part, make sure that ‘Excel Addins’ is selected
Then, press ‘Go’
On the next window, check the ‘Analysis ToolPak’
Click ‘OK’
Now that the toolpak is loaded, click ‘Data’ from the tab list.
https://spreadsheeto.com/p-value-excel/ 6/14
11/3/2020 How To Calculate P Value In Excel (Step-By-Step Tutorial)
On the ‘Analysis’ group, click the ‘Data Analysis’ icon.
On the window, select ‘tTest: Paired Two Sample for Means’. Then,
click ‘OK’.
https://spreadsheeto.com/p-value-excel/ 7/14
11/3/2020 How To Calculate P Value In Excel (Step-By-Step Tutorial)
Another window will open with the following options:
‘Variable 1 Range’ – the cell range of the ‘before’ data (‘Weight’)
‘Variable 2 Range’ – the cell range of the ‘after’ data (‘Result’)
‘Hypothesized Mean Difference’ – the hypothesized mean difference;
can be left blank
‘Labels’ – if labels were included in the ranges
‘Alpha’ – common alpha values are 0.05 and 0.01
‘Output options’ – determine where the results will be placed
https://spreadsheeto.com/p-value-excel/ 8/14
11/3/2020 How To Calculate P Value In Excel (Step-By-Step Tutorial)
As an example, let’s supply the tool with the following variables:
‘Variable 1 Range’ – $B$2:$B$12
‘Variable 2 Range’ – $C$2:$C$12
‘Labels’ – Check
‘Alpha’ – 0.05
‘Output options’ – ‘Output Range: $F$2’
https://spreadsheeto.com/p-value-excel/ 9/14
11/3/2020 How To Calculate P Value In Excel (Step-By-Step Tutorial)
The results will be displayed on the range provided:
On the results, we can see that the pvalue with the onetail test is
0.0063 or 0.63% and the pvalue with the twotail test is 0.0127 or
https://spreadsheeto.com/p-value-excel/ 10/14
11/3/2020 How To Calculate P Value In Excel (Step-By-Step Tutorial)
1.27%.
Kasper Langmann, Cofounder of Spreadsheeto
Both results show that the pvalue is lower than 5%, which means the null
hypothesis is significant.
The ‘T.TEST’ function
It’s also possible to get the pvalue using this function.
It’s syntax is simple:
=T.TEST(array1,array2,tails,type)
Parameters:
‘array1’ – the cell range of the first data set
‘array2’ – the cell range of the second data set
‘tails’ – represents the number of distribution tails; 1 = onetailed and 2 =
twotailed
‘type’ – the ttest type to perform; 1 = paired; 2 = twosample equal
variance (homoscedastic); 3 = twosample unequal variance
(heteroscedastic)
Now, all you got to do is use the formula and provide it with the appropriate
variables:
https://spreadsheeto.com/p-value-excel/ 11/14
11/3/2020 How To Calculate P Value In Excel (Step-By-Step Tutorial)
pvalue (onetailed):
=T.TEST(B2:B11,C2:C11,1,1)
pvalue (twotailed):
=T.TEST(B2:B11,C2:C11,2,1)
As you can see, using the ‘T.TEST’ function will give you exactly the same result
as the tTest tool.
Wrapping things up…
Whichever of the 2 methods we showed you to calculate the pvalue works and
will give you the same result.
https://spreadsheeto.com/p-value-excel/ 12/14
11/3/2020 How To Calculate P Value In Excel (Step-By-Step Tutorial)
If you like to have a detailed analysis, go with the analysis toolpak’s ttest tool. If
the pvalue is all you’re after, the function will do just that.
If you’re not sure which to use, simply give each one a try. We included
an exercise file in this tutorial you can use to follow the steps described
above.
Kasper Langmann, Cofounder of Spreadsheeto
30minute FREE Excel course
Did you like the guide you've just read?
Then you'll LOVE my free Excel course!
You get 3 lessons delivered to your email.
The course is 30 minutes, 100% online and you can go
complete whenever it fits you.
Do as +100,000 others and try it now...
... Click the button to sign up!
NEXT
https://spreadsheeto.com/p-value-excel/ 13/14
11/3/2020 How To Calculate P Value In Excel (Step-By-Step Tutorial)
CONTACT INFORMATION CUSTOMER SERVICE PRODUCTS OUR BEST FREE CONTENT
Spreadsheeto ApS – Customer support – Zero to Hero: Become an We’ve published +100 Excel
ExcelSuperuser in 14 hours tutorials on our blog. Here
Address: Gammel Kongevej – Terms and Conditions are our top 3 picks:
60, 17. 1850 Frederiksberg C, – VBA Masterclass:
Denmark. – Login Become a VBAPro in 20 1: The last guide to
hours VLOOKUP you’ll ever need
VATID: DK40428631
– Team Solution: For 2: How to Delete Blank Rows
Email: Businesses and Easily
hello@spreadsheeto.com Organizations
3: INDEX+MATCH with
– About us – Power BI Essentials multiple criteria in 5 easy
[NEW]: Learn Power BI steps
– Contact us
online!
Pssst… Make sure to check
– Excel consultant out our free Excel training
that adapts to your skill
level too!
Spreadsheeto. We love Excel. You will too.
https://spreadsheeto.com/p-value-excel/ 14/14