TRUNC

Truncates a number to a certain number of significant digits by omitting less significant digits.

Sample Usage

TRUNC(3.141592654,2)

TRUNC(A2,0)

TRUNC(1.23)

Syntax

TRUNC(value, [places])

  • value - The value to be truncated.

  • places - [ OPTIONAL - 0 by default ] - The number of significant digits to the right of the decimal point to retain.

    • If places is greater than the number of significant digits in value, value is returned without modification.

    • places may be negative, in which case the specified number of digits to the left of the decimal place are changed to zero. All digits to the right of the decimal place are discarded. If all digits of value are changed to zero, TRUNC simply returns 0.

Notes

  • TRUNC performs no rounding, simply discarding unwanted digits.

See Also

ROUNDUP: Rounds a number to a certain number of decimal places, always rounding up to the next valid increment.

ROUNDDOWN: The ROUNDDOWN function rounds a number to a certain number of decimal places, always rounding down to the next valid increment.

ROUND: The ROUND function rounds a number to a certain number of decimal places according to standard rules.

MROUND: Rounds one number to the nearest integer multiple of another.

INT: Rounds a number down to the nearest integer that is less than or equal to it.

FLOOR: The FLOOR function rounds a number down to the nearest integer multiple of specified significance.

CEILING: The CEILING function rounds a number up to the nearest integer multiple of specified significance.

Examples

true
Visit the Learning Center

Using Google products, like Google Docs, at work or school? Try powerful tips, tutorials, and templates. Learn to work on Office files without installing Office, create dynamic project plans and team calendars, auto-organize your inbox, and more.

Search
Clear search
Close search
Google apps
Main menu
7467781661310915451
true
Search Help Center
true
true
true
true
true
35
false
false