PI Function in Excel

Returns the mathematical constant called PI

What is the PI Function in Excel?

The PI Function in Excel returns the mathematical constant “pi.” To recap, PI is the ratio of a circle’s circumference and its diameter. Often, we would use the PI Function in Excel especially when our business is required to do geometric calculations. These calculations would entail calculating the area of a new office space, a new factory, etc.

When a human does a PI calculation, it will approximate PI as 3.14. However, Excel stores the value of PI accurately to 15 digits and up to 14 decimal places.


Formula for the PI Function

The syntax for the PI function is = PI()

In Excel, if you just input = PI(), you will get the value of PI as shown below:


PI Function in Excel


To learn more, launch our free Excel crash course now!


How to do calculations using the PI Function in Excel?

Let’s take an example to understand it. Let’s assume we are given 8 as the radius and are required to calculate the area of the circle. The formula to use would be:

PI Formula

  1. To do, this you would first open your Excel spreadsheet. Now input A1 = 8 (radius).
  2. The next step would be to input the formula in the adjacent cell as shown below:


PI Function Calculation


Remember the PI function takes no arguments. The PI function, as we all are aware in Excel, stores the value up to 15 decimals. However, as seen above, the answer is only up to four decimals. What happened here was that Excel rounded up the answer to correspond with the cell’s degree of accuracy. We can increase the number of decimal places as required. As shown below, I raised it to 15 decimal places. This was done by going to Home tab > Format button > Format Cells. The Format Cells dialog would by default display the Number tab.

Now select Number under the category and then type 14 into the Decimal Places field to use all 14 digits of the constant PI in the formula. Click OK.


PI Function Digits


PI Function Calculation Answer


To learn more, launch our free Excel crash course now!


PI Examples in VBA

You can also use the PI function in VBA. Type:


For the function’s arguments, you can either enter them directly into the function or define the variables to use instead.


Free Excel Course

If you want to learn more about functions and become an expert on them, check our CFI’s Free Excel Crash Course!  Go through our step by step instructions and demonstrations on how to become an Excel power user.


free Excel keyboard shortcuts course


Additional resources

Thanks for reading CFI’s guide to important Excel functions! By taking the time to learn and master these functions, you’ll significantly speed up your financial analysis. To learn more, check out these additional resources:

Free Excel Tutorial

To master the art of Excel, check out CFI's FREE Excel Crash Course, which teaches you how to become an Excel power user.  Learn the most important formulas, functions, and shortcuts to become confident in your financial analysis.  

Launch CFI’s Free Excel Course now to take your career to the next level and move up the ladder!