TRUNC removes the decimal part of a number, returning only the integer portion or a specified number of decimal places. Unlike rounding, it simply cuts off extra digits without changing the remaining value.
=TRUNC(number, [num_digits])What does TRUNC do?
The TRUNC function in Excel removes the fractional part of a number. You give it a number and, optionally, how many decimal places to keep, and it returns the number with everything beyond that point chopped off. It never rounds up or down; it simply discards the unwanted digits.
This matters because many business calculations need clean, predictable numbers. Rounding can push a value over a threshold or change a total, while TRUNC gives you a straight cut. It is especially useful when you need to display or store values with a fixed number of decimals without any rounding side effects.
Imagine you are preparing an invoice and the unit price is 19.9876. You want to show 19.98, not 19.99. Using TRUNC with two decimal places gives exactly that. The same logic applies to timesheets, currency conversions, or any report where you must drop extra precision without altering the value through rounding.
When to use TRUNC
- Displaying prices with a fixed number of decimals without rounding up.
- Extracting the whole-number part of a measurement or quantity.
- Truncating timestamps to the hour or minute for grouping.
- Preparing data for systems that reject more than two decimal places.
- Calculating age in whole years from a birth date.
- Removing unwanted precision from imported or calculated values.
TRUNC syntax
=TRUNC(number, [num_digits])| Argument | Required? | What to enter |
|---|---|---|
number | Required | The value you want to truncate. It can be a number, a cell reference, or a formula result. Example: 19.9876. |
num_digits | Optional | How many decimal places to keep. If omitted, it defaults to 0, returning an integer. Use a negative number to truncate to the left of the decimal point. Example: 2 keeps two decimals. |
What it returns: A number with the specified number of decimal places, with any extra digits removed without rounding.
TRUNC examples
1 Truncate a single number to an integer
The goal is to remove all decimals from a value. The formula =TRUNC(B2) uses the number in B2 and, because num_digits is omitted, defaults to 0 decimal places. It cuts off everything after the decimal point, so 12.987 becomes 12. The result is a whole number with no rounding.
| A | B | C | D | E | |
|---|---|---|---|---|---|
| 1 | Item | Value | |||
| 2 | Widget | 12.987 | 12 | ||
| 3 | Gadget | 45.67 | |||
| 4 | Doohickey | 8.1 | |||
| 5 |
2 Keep two decimal places without rounding
Here you want to show prices with exactly two decimals, but without rounding up. The formula =TRUNC(B2, 2) keeps two digits after the decimal point and discards the rest. For 19.9876, it returns 19.98, not 19.99. This is ideal for invoices where you must not overcharge by rounding.
| A | B | C | D | E | |
|---|---|---|---|---|---|
| 1 | Product | Price | |||
| 2 | Pen | 19.9876 | 19.98 | ||
| 3 | Notebook | 5.555 | |||
| 4 | Eraser | 1.239 | |||
| 5 |
3 Truncate to the nearest thousand
You can use a negative num_digits to cut off digits to the left of the decimal point. The formula =TRUNC(B2, -3) removes the last three digits, effectively truncating to the nearest thousand. For 12345, it returns 12000. This is useful for high-level summaries where exact units are not needed.
| A | B | C | D | E | |
|---|---|---|---|---|---|
| 1 | Region | Sales | |||
| 2 | North | 12345 | 12000 | ||
| 3 | South | 6789 | |||
| 4 | East | 98765 | |||
| 5 |
4 Calculate whole years of service
To find completed years between two dates, subtract the start date from the end date to get days, divide by 365.25, and truncate. The formula =TRUNC((B2-A2)/365.25) returns the number of full years. For a start date of 2015-03-10 and end date of 2023-08-15, the difference is about 8.43 years, so TRUNC returns 8.
| A | B | C | D | E | F | |
|---|---|---|---|---|---|---|
| 1 | Employee | Start Date | End Date | |||
| 2 | Alice | 2015-03-10 | 2023-08-15 | 8 | ||
| 3 | Bob | 2018-11-01 | 2023-08-15 | |||
| 4 | Carol | 2020-01-20 | 2023-08-15 | |||
| 5 |
Common TRUNC errors and how to fix them
| Error | Why it happens | How to fix it |
|---|---|---|
| #VALUE! | The number argument is text that cannot be converted to a number. | Ensure the cell contains a number or use a function like VALUE to convert text. |
| #NAME? | The function name is misspelled, e.g., TRUNK instead of TRUNC. | Check the spelling and use TRUNC. |
| Wrong result | Using a positive num_digits when you meant to truncate to the left of the decimal. | Use a negative num_digits for places to the left of the decimal point. |
| Unexpected rounding | Confusing TRUNC with ROUND; TRUNC never rounds. | If you need rounding, use ROUND instead. |
Tips for using TRUNC
- Omit num_digits to get an integer quickly.
- Use negative num_digits to truncate to tens, hundreds, or thousands.
- TRUNC is often faster than ROUND for simple cuts because it does no rounding logic.
- Combine TRUNC with date arithmetic to get whole years or months.
- Remember that TRUNC changes the value, not just the display; use cell formatting if you only want to hide decimals.
- For times, multiply by 24 (hours), 1440 (minutes), or 86400 (seconds) before truncating, then divide back.
Frequently asked questions
What is the difference between TRUNC and ROUND?
TRUNC simply removes digits without rounding, while ROUND changes the last kept digit based on the next digit.
Can TRUNC handle negative numbers?
Yes, TRUNC works with negative numbers. For example, =TRUNC(-12.7) returns -12.
How do I truncate to the nearest thousand?
Use a negative num_digits: =TRUNC(12345, -3) returns 12000.
Does TRUNC change the underlying value?
Yes, TRUNC returns a new value. If you want to keep the original value but display fewer decimals, use number formatting instead.
Related functions
Every example on this page was recalculated by SheetSkill’s spreadsheet engine. TRUNC reference