Note: If you are experienced using Excel functions try the Excel TRUNC Function Quick Tutorial which is a bare bones tutorial on the TRUNC function.
This tutorial is intended for users new to using Excel's rounding functions.
TRUNC Function: Truncate Numbers in Excel
There are a number of rounding functions in Excel and the one you use depends on the results you want.
The TRUNC function is usually included with this group even though it does no rounding.
What it does do is truncate or shorten the target number to a set number of decimal places without rounding the remaining digits or whole number.
Like other rounding functions, the TRUNC function actual alters the data in your worksheet and will, therefore affect the results of any calculations that use the truncated values.
There are, on the other hand, formatting options in Excel that allow you change the number of decimal places displayed by your data without changing the numbers themselves.
Making formatting changes to data has no effect on calculations.
The TRUNC Function's Syntax and Arguments
The syntax for the TRUNC function is:
= TRUNC (number , num_digits)
Num_digits (Optional): The number of decimal places to be left by the function. If this argument is omitted a default value of 0 (zero) is used for num_digits (no decimal places removed).
TRUNC Function Example: Truncate to a set Number of Decimal Places
For help with this example, see the image above.
In this example we will use the TRUNC function to remove three decimal places from the target number.
To show the effect TRUNC function has on calculations, both the original number and the truncated one will be multiplied by 10 and the results compared.
Entering the DataEnter the following data into the designated cells.
Cell Data D1 - 27.3579 E1 - 10 E2 - 10
Entering the TRUNC Function
- Click on cell D2 to make it the active cell - this is where the results of the TRUNC function will be displayed
- Click on the Formulas tab of the ribbon menu
- Choose Math & Trig from the ribbon to open the function drop down list
- Click on TRUNC in the list to bring up the function's dialog box
- In the dialog box, click on the Number line
- Click on cell D1 in the worksheet to enter that cell reference into the dialog box
- In the dialog box, click on the Num_digit line
- Type a " 1 " (no quotations) on this line since we want to leave the target number with only one digit after the decimal point
- Click OK
- The answer 27.3 should appear in cell D2
- When you click on cell D2 the complete function = TRUNC ( D1, 1 ) appears in the formula bar above the worksheet
Using the Truncated Number in Calculations
- Click on cell F1 to make it the active cell - this is where the multiplication formula will be entered.
- Type an equal sign to begin the formula
- Click on cell D1 to enter that cell reference into the formula
- Type an asterisk ( * ) - the symbol for multiplication in Excel
- Click on cell E1 to enter that cell reference into the formula
- Press the Enter key on the keyboard to complete the formula
- The answer 273.579 should appear in cell F1
- Click on cell F1 again to make it the active cell
- Copy the formula in F1 to cell F2 using the Fill Handle or Copy and Paste
- The answer 273 should appear in cell F2
The different formula results in cells F1 and F2 - 273.579 vs. 273 show the effect truncating numbers can have on calculations
While this may not be a significant difference for many calculations, it can be significant for calculations in such fields as engineering or for calculations involving the results of scientific experiments.