TRUNC
Truncates a number to an integer by removing the fractional part
Syntax
TRUNC(number, [num_digits])
Arguments
| Argument |
Description |
Required |
number |
The number you want to truncate |
Required |
num_digits |
A number specifying the precision of the truncation. Defaults to 0. |
Optional |
Examples
Truncate to integer
=TRUNC(3.14159)
Result ⇒
3
Truncate to 2 decimal places
=TRUNC(3.14159, 2)
Result ⇒
3.14
Truncate negative number
Related Functions
Other Math functions:
- ABS - Returns the absolute value of a number
- ACOS - Returns the arccosine, or inverse cosine, of a number
- ASIN - Returns the arcsine, or inverse sine, of a number
- ATAN - Returns the arctangent, or inverse tangent, of a number
- CEILING - Rounds a number up to the nearest integer or to the nearest multiple of significance
- COS - Returns the cosine of the given angle
- EXP - Returns e raised to the power of a given number
- FACT - Returns the factorial of a number
- FLOOR - Rounds a number down to the nearest multiple of significance
- INT - Rounds a number down to the nearest integer
- LN - Returns the natural logarithm of a number
- LOG - Returns the logarithm of a number to a specified base
- LOG10 - Returns the base-10 logarithm of a number
- MOD - Returns the remainder after a number is divided by a divisor
- PI - Returns the value of pi (π)
- POWER - Returns the result of a number raised to a power
- RAND - Returns a random number greater than or equal to 0 and less than 1.
- ROUND - Returns the number after rounding it to a certain number of decimal places.
- ROUNDDOWN - Returns a number rounded to a certain number of decimal places. ROUNDDOWN rounds all numbers down.
- ROUNDUP - Returns a number rounded up to a certain number of decimal places. ROUNDUP rounds all numbers up.
- SIGN - Determines the sign of a number
- SIN - Returns the sine of the given angle
- SQRT - Returns the square root of a number
- SUM - Returns the sum of all numbers in the provided arguments
- TAN - Returns the tangent of the given angle
← Back to Formula Reference