# TRUNC

The TRUNC function is used to truncate a number to a specified number of digits after the decimal point. It is handy when you want to simplify or round down a number to a specific precision.

## Syntax ๐

=TRUNC(`number`

, `[num_digits]`

)

`number` | The number you want to truncate. |

`num_digits` (Optional) | The number of digits to keep after the decimal point. If omitted, the number is truncated to the nearest integer. |

## About TRUNC ๐

When you find yourself with numbers that have more decimal places than you need, TRUNC in Excel comes to the rescue. This function is a go-to tool for simplifying numbers by chopping off the excess decimals, ensuring your calculations stay focused and precise. TRUNC is particularly beneficial for scenarios where you wish to work with rounded-down values or when you want to eliminate the decimal portion of a number without rounding it up.

To make the most of TRUNC, you provide the number you want to truncate and, if desired, specify the desired precision by indicating the number of digits after the decimal point that you want to preserve. By employing TRUNC, you can swiftly transform unwieldy numbers into streamlined figures that align with your calculation requirements.

TRUNC's versatility shines through in various fields, from financial analysis to data management, offering a straightforward solution for managing numbers with excess decimal places accurately.

## Examples ๐

If you have a number, 15.7896, and you want to truncate it to two decimal places, the TRUNC formula would be:

=TRUNC(15.7896, 2)

This returns 15.78, as it truncates the number to two decimal places.

Suppose you have a number, -8.643, and you wish to truncate it to the nearest integer. The TRUNC formula would be:

=TRUNC(-8.643)

This will return -8, as it truncates the number to the nearest whole number.

## Notes ๐

The TRUNC function works by simply cutting off the excess decimal places from the number you specify. If you provide a positive value for `num_digits`

, TRUNC retains that number of digits after the decimal point. On the other hand, if you omit the `num_digits`

argument, TRUNC will truncate the number to the nearest integer.

Remember that TRUNC does not round the number; it simply truncates it towards zero. So, if you need rounding functionality, consider using the ROUND function in Excel instead.

## Questions ๐

**How does the TRUNC function differ from the ROUND function in Excel?**

While TRUNC chops off the decimal part of the number towards zero, the ROUND function rounds a number to a specified number of digits. TRUNC always rounds down, whereas ROUND follows standard rounding rules (rounds up if the decimal is 5 or more).

**Can the TRUNC function be used to round numbers?**

No, the TRUNC function does not round numbers. It simply removes the decimal part of a number, truncating it towards zero. If you need to round numbers, you should use the ROUND function instead.

**How does the TRUNC function handle negative numbers?**

When dealing with negative numbers, the TRUNC function truncates towards zero, meaning it removes the decimal without adjusting the sign. For example, truncating -8.56 to two decimal places will result in -8.56, not -8.55.