TRUNC Function truncates a decimal number to a certain number of significant digits. Say like converting 12.365 to 12.3 or 10.5322 to 10.53
This is a very useful function if your are just looking to limit no of digits after decimal places and not to round off specifically. Lets cover all the necessary components and gain complete understanding of dynamics of TRUNC Function.
Purpose of TRUNC Function
Google defines TRUNC Function as “Truncates a number to a certain number of significant digits by omitting less significant digits“. And this is exactly what it does as well.
To use it simply type “=TRUNC(” place the number within and close the bracket. Another ways is to click on the function dropdown in the Toolbar.
Syntax and Parameter Definition
- value: The number you want to Truncate
- [places]: The number of digits to the right of decimal, you want to retain.
- TRUNC Function only accepts numerical input.
- Any form of non-numerical input(like “abc”, “xyz” etc) will result in an “#VALUE!” error.
- TRUNC doesn’t perform any rounding operation like ROUND/CEIL/FLOOR. It simply retains the number of decimal places as told to and deletes the rest
TRUNC Function retains the specified number of digits post decimal place and deletes the rest. Below are some examples to help understand the function better.
From first two examples it’s pretty clear that TRUNC simply keeps 2 digits post decimal and deletes the rest. Also, there is no impact of number being positive or negative.
In the third example we are left with 15.5 since we specificed the [places] argument to be 1.
Example 4 & 5, though have similar outputs, but have different formula’s. In 5, even though we didn’t specify the anything, we ended up with a similar result since the default value of [places] is 0.
Visual Demonstration of INT
Before we end here is a simple visual demonstration of TRUNC Function
That’s it on this topic. Keep browsing SheetsInfo for more such useful information 🙂