Example 1
Drop the decimals
B2 =TRUNC(A2)
Result: 8
TRUNC cuts the .9 off. ROUND would give 9.
B2 =TRUNC(A2) returns 8
Cuts off the decimal part of a number, or keeps a set number of decimals, without rounding. -8.9 becomes -8.
Syntax
=TRUNC(, )
All versions of Excel.
Try it
Edit the formula in B2 or change the inputs. The sheet recalculates as you type.
B2 =TRUNC(A2) returns 8
TRUNC removes digits from a number without rounding. =TRUNC(8.9) returns 8 and =TRUNC(3.14159, 2) returns 3.14. It never looks at the digit it drops, so 8.99 is 8, not 9.
TRUNC moves towards zero. =TRUNC(-8.9) returns -8, because it just removes the .9. This is the difference from INT, which rounds down to the next lower integer and returns -9. For positive numbers the two give the same answer.
Without a second argument TRUNC returns a whole number. With one, it keeps that many decimals: =TRUNC(12.3456, 2) is 12.34. A negative value cuts digits left of the point and replaces them with zeros, so =TRUNC(1234.5, -2) returns 1200.
=TRUNC(B2) and =B2-TRUNC(B2).=TRUNC(A2) returns the date at midnight.FLOOR.MATH rounds down to a multiple.Setting a cell to show two decimals rounds the display, but leaves the full value underneath. TRUNC changes the stored value, so any formula using the cell sees the truncated number. Before you truncate money, check whether the rule you are following asks for truncation or for rounding. They differ by up to one unit in the last place.
TRUNC needs numbers. Text returns #VALUE!.
B2.0 and TRUNC returns a whole number. A negative value cuts off digits to the left of the point: -2 keeps hundreds.Each example is a live sheet. Change the inputs or the formula and watch the result.
Example 1
B2 =TRUNC(A2)
Result: 8
TRUNC cuts the .9 off. ROUND would give 9.
B2 =TRUNC(A2) returns 8
Example 2
B2 =TRUNC(A2)
Result: -8
INT would return -9. TRUNC only removes the decimal part.
B2 =TRUNC(A2) returns -8
Example 3
B2 =TRUNC(A2,2)
Result: 3.14
The digits after the second decimal are dropped.
B2 =TRUNC(A2,2) returns 3.14
Example 4
B2 =TRUNC(A2,-2)
Result: 1200
A negative num_digits replaces digits left of the point with zeros.
B2 =TRUNC(A2,-2) returns 1200
Example 5
B2 =TRUNC(A2,2)
Result: 99.99
ROUND would give 100.00, which pays out more than was earned. TRUNC gives 99.99.
B2 =TRUNC(A2,2) returns 99.99
Solve it in the sheet. Every answer is checked, with hints if you need them.
Task 1 of 2
In C2, return the payout in B2 cut off at two decimals, without rounding it up. Fill it down to C6.
Answer in C2, then it fills down to C6.
TRUNC(1234.5, -2) is 1200, not 1234.#VALUE!. Keep units out of the number cell.It removes digits from a number without rounding. TRUNC(8.9) is 8 and TRUNC(3.14159, 2) is 3.14.
They agree for positive numbers. For negative numbers TRUNC moves towards zero (-8.9 becomes -8) and INT goes to the next lower integer (-8.9 becomes -9).
For any number and number of digits, yes. TRUNC makes the digits argument optional, so it is shorter for a whole number.
Use `=TRUNC(B2, 2)`. Formatting a cell to two decimals only changes the display and rounds it, while TRUNC changes the value.
Use `=TRUNC(A2)` and format the result as a date. The time is the fraction after the decimal point and TRUNC removes it.
Tracks take you from the basics to modelling, one graded exercise at a time.