How to Write Pi in Excel (5 Suitable Ways)

Get FREE Advanced Excel Exercises with Solutions!

In this article, we will learn how to write Pi in Excel. There are many applications of Pi and it is the most common constant. For this reason, in many equations or calculations, we need to use Pi. Today we will discuss 5 methods of writing Pi and an application of Pi. So, without any delay, let’s start the discussion.


Writing PI in Excel: 5 Suitable Ways

To explain the methods, we will use different datasets in different methods. In the first methods, we will show the value of Pi and in the last methods, we will insert the symbol of Pi with value.


1. Use of Formula to Write Pi in Excel

You can easily write Pi by entering the formula on any cell. Here, we will use the PI Function to get the value of Pi.  Follow the steps below to learn the method.

STEPS:

  • Firstly, select a cell where you want to write Pi.
  • In the C5 cell, we will write Pi.
  • For this reason, select cell C5.

Use of Formula to Write PI in Excel

  • Then, type the formula:
=PI()

  • Now, press Enter and you can see the value of Pi.
  • You can see the maximum of 15 digits after the decimal point in Excel.
  • As per settings, we are seeing 9 digits after the decimal point.
  • You can change the visible range.

  • After that, from the ribbon find out the Number group and press the following icon.
  • After pressing, the visible digit range will decrease.
  • The number of decreasing visible ranges depends on how many times you press the icon.

  • So, the visible range of Pi is decreased.
  • We have pressed the icon 7 times.
  • For this reason, the visible range has decreased to 7 digits.

Use of Formula to Write PI in Excel

  • Similarly, we can increase the visible range of Pi.
  • You have to select the following icon of the Number group to increase the visible digits of Pi.

  • Finally, the visible range of Pi is increased after pressing the icon.

Use of Formula to Write PI in Excel


2. Utilize Math & Trig Option to Type Pi in Excel

You can easily write Pi by utilizing the Math & Trig option. Follow the steps below to learn the method.

STEPS:

  • Firstly, select a cell where you want to write Pi.
  • In the C5 cell, we will write Pi.
  • For this reason, select cell C5.

Utilize Math & Trig Option to Type PI in Excel

  • Secondly, go to the Formulas tab.
  • From the Formulas tab, select Math & Trig.

  • After selecting, a dialog box will come out.
  • From the dialog box find out PI and click on the PI.

Utilize Math & Trig Option to Type PI in Excel

  • Now, the formula of Pi is showing on our expected cell.
  • So, the cell is containing Pi.
  • Click OK.

  • Finally, we can see the value of Pi in our expected cell C5.


3. Apply Excel VBA to Write Pi

You can easily write Pi with the help of Excel VBA code. Follow the steps below to learn the method. Here, in the C5 cell, we will write Pi.

Apply Excel VBA to Write PI

STEPS:

  • Firstly, select Visual Basic from the Developer tab.

  • After that, the Visual Basic window will open up.
  • In the Visual Basic window, you have to select Module from the Insert tab.

  • After that, the module window will be shown up.
  • Now, type the code below in the module window:
Sub VBAtoWritePi()
Dim Pi As Single
Pi = Application.WorksheetFunction.Pi()
Debug.Print Pi
End Sub

Apply Excel VBA to Write PI

  • Now, we need to save the code first and then, run it.
  • To save the code, simply hit Ctrl + S on the keyboard.
  • After that, press the F5 key to run the code.
  • Otherwise, we can simply click the “run” button shown below after saving.

  • We need to open Immediate Window as the value of Pi is printed here.
  • From the View tab, select Immediate Window.
  • Alternatively, you can also open this window by pressing Ctrl + G on the keyboard.

Apply Excel VBA to Write PI

  • From the Immediate window, the value of Pi is visible.
  • So, we have to copy the value.
  • Now, select the value and press Ctrl + C to copy the value.

  • In the following step, paste the copied value into your desired cell.
  • We wanted the put Pi on cell C5.
  • So, select cell C5 and paste the value by pressing Ctrl + V.

  • On the other hand, we can also take a 15-digit Pi value from the VBA code.
  • Similarly, open the module window and type the following code:
Sub VBAtoWritePi()
Dim Pi As Double
Pi = Application.WorksheetFunction.Pi()
Debug.Print Pi
End Sub

  • Similarly, run the code.
  • Now, look at the Immediate window.
  • In the window, 2 values are showing.
  • 1st result is for the latest code and the 2nd one is for the previous code.
  • Now, copy the latest Pi value by pressing Ctrl + C.

  • Finally, select cell C5 and paste the value of Pi by pressing Ctrl + V.

Apply Excel VBA to Write PI


4. Use Keyboard Shortcut to Type Pi Symbol in Excel

Using the Atl key and Atl code of the keyboard, we can easily insert the Pi symbol in Excel. Follow the steps below to learn the method.

STEPS:

  • Firstly, select a cell where you want to write the Pi symbol.
  • In the C5 cell, we want to write the symbol.
  • For this reason, select cell C5.

Use Keyboard Shortcut to Insert PI Symbol in Excel

  • After that, turn on the Num Lock key on the keyboard.
  • Now, press and hold the Alt key.
  • Press 227 from the keyboard.
  • It will not work if you use the number keys at the top of the keyboard.
  • Finally, release the Alt key and you will see the pi symbol in the desired cell.

  • After that, fill up the value of Pi.
  • Using the formula on the D5 cell, you can easily put the value of Pi.
=PI()

  • Finally, we have been able to show the symbol and value of Pi.

Use Keyboard Shortcut to Insert PI Symbol in Excel


5. Utilize Font Type to Insert Pi Symbol

Utilizing Font Type you can easily insert the Pi symbol in Excel. Follow the steps below to learn the method.

STEPS:

  • Firstly, select cell C5.

Utilize Font Type to Write PI Symbol in Excel

  • Secondly, type p in the cell.
  • After that, bold the p by selecting the B button in the Font group.

  • Now, the current font is Calibri.
  • We need to change the font.

  • In the following step, select Symbol font from the drop-down menu of Font.

Utilize Font Type to Write PI Symbol in Excel

  • Now, return to the cell.
  • In the C5 cell, the Pi symbol is showing.

  • In the D5 cell, you want to put the value of Pi here.
  • After selecting the D5 cell, type the formula and press Enter.
=PI()

  • Finally, our desired output is ready.
  • We have successfully written the symbol and value of Pi in Excel.

Utilize Font Type to Write PI Symbol in Excel

Read More: [Solved!] Name Error of PI Function in Excel


How to Multiply Pi in Excel

There are many applications of Pi and we want to show you a simple application of Pi. You can Multiply Pi in Excel. You can easily find the area of a circle if you know the radius. Let’s see the method.

STEPS:

  • At first, we need the value of Pi.
  • So, select the B5 cell.
  • Then, type the formula below and press Enter.
=PI()

How to Multiply PI in Excel

  • Now, the value of Pi is showing.

  • We want to do the calculation for a circle of a 3-meter radius.
  • So, type 3 in the C5 cell.

  • Next, we have to find the area.
  • The area is calculated by the multiplication of Pi and the square of the radius.
  • So, type the following formula to calculate the area:
=B5*C5*C5

How to Multiply PI in Excel

  • Press Enter to see the final result.

  • To calculate the area of the different circles you need to change the value of the C5 cell.
  • We have changed the radius from 3 to 5 and pressed Enter.
  • Finally, the new area is also calculated.

How to Multiply PI in Excel

Read More: How to Use PI(π) in Excel VBA 


Download Practice Workbook

To practice by yourself, download the following workbook.


Conclusion

In this article, we have demonstrated how to write pi in Excel. There is a practice workbook at the beginning of the article. Lastly, please use the comment section below to post any questions or make any suggestions you might have.


<< Go Back to Excel PI Function | Excel Functions | Learn Excel

What is ExcelDemy?

ExcelDemy - Learn Excel & Get Excel Solutions Center provides online Excel training , Excel consultancy services , free Excel tutorials, free support , and free Excel Templates for Excel professionals and businesses. Feel free to contact us with your Excel problems.
Sudipta Chandra Sarker
Sudipta Chandra Sarker

Sudipta Chandra Sarker, BSc, Electrical and Electronic Engineering, Bangladesh University of Engineering and Technology, Bangladesh, has worked on the ExcelDemy project for over a year. For ExcelDemy, he has authored 42 articles and reviewed over ten articles. He is employed as a junior software developer at the moment. He aims to create various useful Microsoft Office Add-ins, extending the functionality of Office programs. His interests span Microsoft Office Suites, Data Science, VBA, VB.NET, ASP.NET, C#, Excel, and Desktop... Read Full Bio

We will be happy to hear your thoughts

Leave a reply

Advanced Excel Exercises with Solutions PDF

 

 

ExcelDemy
Logo