
When dealing with numbers in Excel, sometimes you don’t want to round them—just get rid of the decimal part. That’s where Excel’s TRUNC
function comes in handy. If you’re wondering how TRUNC
works in Excel and looking for the best TRUNC
examples, you’re in the right place.
What Is the TRUNC Function?
The TRUNC
function in Excel removes the fractional part of a number without rounding it. This means that it simply cuts off everything after the decimal point.
TRUNC Function Syntax
TRUNC(number, [num_digits])
Let’s break down its arguments:
- number – The numeric value you want to truncate.
- num_digits (optional) – The number of decimal places to keep. If omitted, it defaults to
0
, meaning it removes all decimal places.
Basic TRUNC Examples
Here are some examples to illustrate how TRUNC
works:
Formula | Result | Explanation |
---|---|---|
=TRUNC(5.89) |
5 | Removes the decimal part, keeping only the integer. |
=TRUNC(-7.25) |
-7 | Same behavior applies to negative numbers. |
=TRUNC(3.14159, 2) |
3.14 | Keeps two decimal places without rounding. |
How TRUNC Differs from INT
Some people confuse TRUNC
with the INT
function, as both deal with removing the decimal part. However, there’s a critical difference:
TRUNC
removes the decimal part but doesn’t round.INT
rounds a number down to the nearest integer.
Consider this example:
=TRUNC(-5.99) → -5 =INT(-5.99) → -6
Notice the difference? INT
rounds down to -6, while TRUNC
just removes the decimal, leaving -5.
Using TRUNC in Real-Life Scenarios
TRUNC
is particularly useful in several situations:
1. Extracting the Integer Part of a Number
If you need to get just the whole number without any decimals, TRUNC
is the simplest way.
2. Working with Time Values
Excel stores time as decimal fractions of a day. If you need to strip the time portion from a date-time value:
=TRUNC(A1)
This will remove the time component, leaving only the date.
3. Limiting Decimal Places Without Rounding
Unlike ROUND
, which modifies values based on rounding rules, TRUNC
simply cuts off excess decimal places.
Potential Pitfalls and Things to Keep in Mind
TRUNC
does not round numbers—it merely removes decimals.- For negative numbers,
TRUNC
doesn’t round down; it just ignores decimals. - If you need true rounding, use
ROUND
instead.
TRUNC vs. Other Similar Functions
Let’s compare TRUNC
to other similar functions:
Function | Behavior | Example (-5.99) |
---|---|---|
TRUNC |
Removes decimals without rounding. | -5 |
INT |
Rounds down to the nearest integer. | -6 |
ROUND |
Rounds based on standard rounding rules. | -6 |
FLOOR |
Rounds down to a specified multiple. | -6 (if multiple is 1) |
Final Thoughts
The TRUNC
function in Excel is simple but powerful when you need to strip away decimals without rounding. Whether you’re working with financial data, timestamps, or just extracting whole numbers, knowing how TRUNC
works in Excel can save you a lot of time.
Other interesting article:
How INT works in Excel? Best INT examples