Google Sheets PI Function: Step-by-Step Guide
In this article
The PI function in Google Sheets returns the mathematical constant pi (π) as a number, approximately 3.14159265358979. It takes no arguments, so you simply type =PI() into a cell and press Enter. Use it whenever you need pi in a formula for circle area, circumference, or any trigonometric calculation in your spreadsheet.
What You'll Need
- A Google account with access to Google Sheets (free with any Google account).
- A spreadsheet open in a browser on desktop or in the Google Sheets mobile app.
- Basic familiarity with typing formulas that start with an equals sign.
Step-by-Step
- Open your spreadsheet. Go to sheets.google.com, sign in, and open an existing file or create a new blank spreadsheet. On mobile, open the Google Sheets app and tap the file you want to edit.
- Select the cell where you want pi to appear. Click or tap any empty cell, for example A1.
- Type the formula. Enter
=PI()exactly, including the equals sign and the empty parentheses. The parentheses are required even though the function takes no arguments. - Press Enter (or Return). The cell now displays the value of pi, typically shown as 3.14159265358979 depending on column width and formatting.
- Use pi inside a larger formula. For example, to calculate the area of a circle with the radius in cell B1, type
=PI()*B1^2. To calculate circumference, use=2*PI()*B1. The PI() function can appear anywhere a number is allowed. - Format the result if needed. Select the cell, then use the toolbar's decimal place buttons (Increase decimal places / Decrease decimal places) to show more or fewer digits. The underlying value does not change; only the display does.
- Copy the formula to other cells. Drag the fill handle (the small square at the bottom-right of the selected cell) down or across. Because PI() has no cell references, it returns the same value everywhere; combine it with relative references if you want each row to calculate a different circle.
- Check for errors. If you see #NAME? or a parse error, confirm you typed PI with no space before the parentheses and that your spreadsheet's locale uses the expected argument separator. In most locales PI() needs no separator at all because it has no arguments.
Common Mistakes
- Omitting the parentheses. Typing
=PIwithout parentheses usually returns a #NAME? error or is treated as text. Always write=PI(). - Typing a value instead of the function. Hard-coding 3.14 loses precision. Use PI() so calculations stay accurate to the full double-precision value Sheets stores.
- Putting an argument inside the parentheses. PI() takes no arguments.
=PI(3)returns an error. If you need to multiply, do it outside:=PI()*3. - Confusing display with stored value. A cell formatted to two decimals shows 3.14 but still calculates with the full value. Do not assume the visible number is all that is used.
- Using a comma or semicolon inside empty parentheses. Some users add a stray separator out of habit; that produces an error because the function expects no parameters.
- Expecting PI to update. It is a constant, not a live measurement. It will not change when other cells change.
Tips
- Use the DEGREES and RADIANS functions alongside PI when working with angles, since Sheets trigonometric functions like SIN and COS expect radians.
- To convert degrees to radians manually, multiply by
PI()/180. - If you need pi in many formulas, put
=PI()in a named cell and reference it, or define a named range for readability. - Combine PI() with ROUND to control output, for example
=ROUND(PI(),4)gives 3.1416. - Remember that PI() returns a numeric value, so it works in charts, conditional formatting rules, and data validation formulas like any other number.
- On mobile, the formula bar is available after tapping a cell and then the formula editing area; the function works identically to desktop.
Troubleshooting
If =PI() returns an error, first check for a typo: the function name must be PI, the parentheses must be empty, and there should be no space between PI and the opening parenthesis. If your sheet uses a locale where the function name is localized, the English PI may not be recognized; switch the spreadsheet locale or use the localized name shown in the function list. If the cell shows the formula as text instead of calculating, the cell may be formatted as plain text: select it, choose Format > Number > Automatic, then re-enter the formula. If you see a circular dependency warning, PI() is not the cause; check whether the cell references itself elsewhere in the formula. When a formula containing PI() gives an unexpected result, verify operator precedence: =PI()*2^2 squares before multiplying, while =(PI()*2)^2 multiplies first. Finally, if the function works in one sheet but not another, compare the two files' locale and calculation settings under File > Settings.
Frequently Asked Questions
Does the PI function take any arguments?
No. PI() has no parameters; the empty parentheses are required syntax.
How many decimal places does PI() return?
It returns the full double-precision value Sheets stores, roughly 15 significant digits. Display depends on cell formatting.
Can I use PI without parentheses?
No. Typing =PI without parentheses typically produces a #NAME? error.
Is PI() available in the Google Sheets mobile app?
Yes. The function works the same on Android and iOS as in the browser version.
Why does my cell show 3.14 instead of the full value?
The cell is formatted to two decimal places. The stored value is unchanged; increase decimal places to see more digits.
Can I use PI() in array formulas?
Yes. For example, =ARRAYFORMULA(PI()*A1:A10^2) calculates circle areas for a column of radii.