How to use Excel INT and PI functions: rounding and pi

Explain clearly the downward rounding rules of the INT function in Excel, the special results of negative numbers, and the usage of the PI function to return pi. Use examples to demonstrate the calculation of area, perimeter and integer division, and point out common writing errors.

Key points of this article

  • The INT function returns a large integer not larger than the number. It is rounded down, not rounded. The result of INT(8.9) is 8.
  • When dealing with negative numbers, INT will round to the smaller direction on the number axis, INT(-8.9) will get -9, and TRUNC(-8.9) will get -8.
  • PI() has no parameters and the parentheses cannot be omitted. It returns a pi with a precision of about 15 digits. When calculating the circle area, it should be written as PI()*radius^2.
  • Manual input of 3.14 will lose precision, and the result will deviate from the calculated value of PI(). The difference will accumulate when calculating in large batches.
  • Modifying the number of decimal places in a cell only changes the display, but does not change the actual values involved in the calculation.

When doing table calculations, we often encounter two types of needs: one is to convert decimals into integers, such as 12 per box, and the total number is divided by 12 to only retain the number of whole boxes; the other is calculations related to circles, such as calculating the area or circumference of a circle, which requires the use of pi. Excel's INT and PI functions solve these two types of problems respectively. They only do one thing, but if used incorrectly, the results will deviate from expectations.

This article is written for people who often use Excel to do statistics, quotations, inventory or simple engineering calculations. After reading, you will know the different results of INT on positive and negative numbers, what is the difference between it and ROUND and TRUNC, and why PI() must have parentheses, and why it is not recommended to enter 3.14 directly. The examples in this article can be reproduced in your own tables.

How to use the INT function to round and the PI function to round up the pi? One sentence conclusion

The INT function will round the number down to a large integer not larger than it, and the PI function directly returns the pi. Neither requires complicated settings. The key is to understand the rounding direction and the writing of brackets.

your situationRecommended practicesreason
As long as the integer part of the positive number is used, for example, statistics based on the number of whole boxesUse =INT(numeric value), or =INT(total number/number per box)INT rounds positive numbers down, the result is the integer part
The number may be negative, such as loss amount, temperature changeFirst confirm whether you need to move closer to 0. If so, use TRUNC. If not, use INT.INT will get a smaller integer for negative numbers, and the result may be different from intuition
Needs to be rounded to an integerUse ROUND(numeric,0) instead of INTROUND is processed to the nearest integer, INT is just rounded down.
Calculate the area or circumference of a circleUse =PI()radius^2 or =2PI()*radiusThe pi returned by PI() has high accuracy and reliable calculation results.
Want to display pi as 3.14Only adjust the number of decimal places displayed in the cellThe number of display digits does not affect the actual values involved in the calculation.

What is the INT function and how does it round?

The complete writing method of INT is =INT(number), which has only one parameter. Its rule is: return a large integer not larger than the number. For positive numbers, the decimal part is removed directly; for negative numbers, it is rounded to the left of the number axis, that is, to a smaller integer.

Round down, not round up

Many people think of INT as rounding, which is a common misunderstanding. In fact INT is always rounded down:

  • =INT(8.9) results in 8, not 9.
  • =INT(8.1) also results in 8.
  • The result of =INT(5) is 5, integers are not affected.

So it is suitable for "counting the whole part", such as counting the complete number of packages, the complete number of days or the complete year. If you need to round to the first decimal place, you should use the ROUND function.

Negative numbers are an easy pitfall.

The results of INT on negative numbers can be unexpected. The result of =INT(-8.9) is -9, because -9 is a large integer not larger than -8.9. This is particularly prone to errors when calculating losses, temperature differences or negative inventory changes.

If your requirement is to "remove the decimal part and retain the sign direction of the integer", that is, to make -8.9 become -8, you should use the TRUNC function instead of INT.

Split integers and remainders using INT

INT is often used with division to calculate the number of bins and remainders. For example, the total number is written in A2, 12 pieces per box:

  • Number of whole boxes: =INT(A2/12)
  • Number of remaining items: =A2-INT(A2/12)*12

If A2 is 50, the number of whole boxes is 4, and the remaining number is 2. This split is commonly used in inventory, scheduling, and group calculations.

What does the PI function return and why the parentheses cannot be omitted?

The PI function is written as =PI(). It has no parameters, but the parentheses must be retained. It returns the approximate value of pi. The precision saved internally by Excel is about 15 significant digits. The displayed value is usually a value like 3.14159265358979. The specific number of digits displayed depends on the cell format.

Accuracy of pi

PI() returns a more precise value than 3.14. For example, the area of a circle with a radius of 5 cm is calculated as follows:

  • Area: =PI()*5^2, the result is about 78.54.
  • Perimeter: =2PI()5, the result is about 31.42.

Both results use full precision pi. If you change PI() to 3.14, the result will be slightly smaller. The larger the radius or the more values, the more obvious the error will be.

Common misunderstanding: direct input 3.14

In order to save trouble, many people will write 3.14 directly in the formula. This approach is acceptable for simple estimation, but it is not recommended for batch calculations or tables that require strict results. There are two reasons:

  1. 3.14 is just a cutoff value of pi, which will bring systematic bias.
  2. The constant is hard-coded in the formula. It is not easy to see its origin during subsequent inspection, and it is also inconvenient to modify it uniformly.

Using PI() can make formulas clearer and more consistent.

Another common misunderstanding: changing the number of decimal places changes the value

Set the cell to two decimal places, and the display will indeed change to 3.14, but the actual value involved in the calculation is still the full-precision pi. If you want the value itself to become 3.14, you need to use a function like ROUND to handle it explicitly, rather than just changing the display format.

📊 Core comparison

The following three rounding-related functions are easy to be confused together. The table compares their rules together.

functionProcessing methodResults for 8.9Result for -8.9
INTGet down to a large integer not greater than this number8-9
TRUNCJust remove the decimal part and get closer to 08-8
ROUND(value,0)Round to the nearest whole number9-9

As can be seen from the table, INT and TRUNC have the same results for positive numbers, but different results for negative numbers; ROUND has obvious differences between 8.9 and INT. When choosing a function, first think clearly whether you want "down", "closer to 0" or "press to the nearest integer".

How to use it in practice

If your data comes from PDF, such as a quotation or statistical table, you can first export the table to Excel and then process it with INT and PI. The following steps apply to this scenario:

  1. Open the PDF in the OmniDoc desktop client (download.omnidoc.top) and use the export function of the PDF editor to export the table to Excel format.
  2. Find the number column that needs to be rounded in Excel, enter =INT(A2) in the blank column, and then fill in the formula downwards.
  3. If split by full box, enter =INT(A2/12) to calculate the number of full boxes, and then use =A2-INT(A2/12)*12 to calculate the remaining number.
  4. If circular calculations are involved, enter =PI() in the required cell, and then use it to construct the area or perimeter formula, such as =PI()*B2^2.
  5. Check for negative results: If there are negative numbers in the data, check to see if they should use TRUNC instead of INT.

If the exported table has merged cells or missing formulas, manual verification is required, especially the amount and quantity columns.

🎯 Which method is suitable for you?

  • Only the integer part is required and the data are all positive numbers: just use INT, the formula is simple and the results are intuitive.
  • The data may have negative numbers and you want to preserve the direction: use TRUNC to avoid INT pushing negative numbers to smaller values.
  • Standard rounding is required: use ROUND, and specify the number of decimal places.
  • Do circle-related calculations: use PI() uniformly, do not mix 3.14, for easy inspection and modification.

❓ Frequently Asked Questions (FAQ)

1. What is the difference between the INT function and the ROUND function?

INT always rounds down, ROUND rounds to the nearest integer. For example, 8.9 uses INT to get 8 and ROUND to get 9. Use ROUND when standard rounding is required, or INT when only the integer part is required.

2. What is the result of INT(-5.5)?

The result is -6. INT returns a large integer that is no larger than this number, -6 is less than -5.5, and is a large qualified integer. If you want -5, you should use TRUNC.

3. Can PI() be used directly in ordinary numerical calculations?

Yes, PI() returns a numerical value, which can be directly involved in addition, subtraction, multiplication, division and power operations. For example, the result of =PI()*2 is pi multiplied by 2. Note that the parentheses cannot be omitted. If you write PI directly without parameters, you will get wrong results.

4. Why does the result not change after setting the number of decimal places in a cell?

Cell format only changes the display mode, not the actual value. If you want the value itself to be converted to a specified number of decimal places, you need to use functions such as ROUND and TRUNC, or copy the result and paste it as a value using specialization.

5. When using INT in Excel to export numbers from PDF, the result is incorrect. What should I do?

First check whether the number is in text format. Numbers in text format will not be involved in the calculation. You can use column division or numerical conversion to convert it into a number, and then re-enter the INT formula. The exported table requires manual checking. It is recommended to check a few lines against the original PDF.

📝 Summary

INT is used for rounding down, and special attention needs to be paid to the results of negative numbers; PI() returns the full precision pi, the brackets cannot be omitted, and it is not recommended to write 3.14 directly. Mastering these two functions, combined with the differences between ROUND and TRUNC, can more accurately complete rounding and circular calculations in Excel.

Open OmniDoc and work with your spreadsheet file

Updated 2026-11-11