← All functions

TRUNC

Supported, behaves as documented

Category: Math and trigonometry · Last tested 2026-08-06

Real, executed compatibility results for the TRUNC function across Microsoft Excel, Google Sheets, and LibreOffice Calc — verified by actually running it. Syntax and links to each vendor’s official documentation are below.

Support matrix

EngineDocumentedLive-testedVerdict
Excel Yes Not yet n/a
Google Sheets Yes Not yet n/a
LibreOffice Calc Yes Yes (25.8.7.3, 2026-08-06) Supported, behaves as documented

LibreOffice version history

We executed the same test cases under each LibreOffice release to show exactly when TRUNC’s support changed — not documentation claims, real results.

LibreOffice versionVerdictTested
24.2.0.3 Supported, behaves as documented 2026-07-19
24.8.7.2 Supported, behaves as documented 2026-07-19
25.2.0.3 Supported, behaves as documented 2026-07-24
25.8.7.3 Supported, behaves as documented 2026-08-06

Executed test cases

LibreOffice Calc 25.8.7.3 (tested 2026-08-06)

FormulaDescriptionResultExpectedVerdict
=TRUNC(8.9) Positive fractional number truncates its decimal part (same result as INT here) 8 8 Matched
=TRUNC(-8.9) Documented classic divergence from INT: TRUNC simply removes the fractional part with no rounding, i.e. truncates TOWARD zero -8 -8
Per Microsoft's TRUNC function docs, TRUNC(-8.9) = -8 (fractional part discarded, toward zero), whereas INT(-8.9) = -9 (rounds down, away from zero) -- see the paired INT_negative_rounds_toward_negative_infinity case in INT.json
Matched
=TRUNC(3.14159,2) num_digits=2 keeps two decimal places, discarding the rest without rounding 3.14 3.14
3.14159 truncated (not rounded) at 2 decimals is 3.14; if it were ROUND instead, 3.14159 would still round to 3.14 here, but TRUNC(3.145,2) vs ROUND(3.145,2) would diverge -- this case isolates the num_digits mechanic, not the rounding-vs-truncating distinction
Matched
=TRUNC(12345,-2) Negative num_digits truncates digits to the LEFT of the decimal point 12300 12300
Negative num_digits zeroes out the last 2 digits of the integer part without any rounding
Matched

Docs & syntax

Compared against other functions