TRUNC
Supported, behaves as documentedCategory: Math and trigonometry · Last tested 2026-09-01
Real compatibility results for the TRUNC function: executed in Excel for the web, Google Sheets and LibreOffice Calc, with desktop Excel behavior from Microsoft’s official documentation (we do not run desktop Excel — Excel for the web is a different application and is executed separately). Syntax and links to that documentation are below.
Support matrix
| Engine | Documented | Live-tested | Verdict |
|---|---|---|---|
| Excel (desktop) | Yes | No — documented only | n/a |
| Excel for the web | — | Yes (recalc, 2026-09-01) | Supported, behaves as documented |
| Google Sheets | Yes | Yes (Drive import, 2026-08-29) | Supported, behaves as documented |
| LibreOffice Calc | Yes | Yes (25.8.7.3, 2026-07-29) | 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 version | Verdict | Tested |
|---|---|---|
| 24.2.0.3 | Supported, behaves as documented | 2026-08-29 |
| 24.8.7.2 | Supported, behaves as documented | 2026-08-29 |
| 25.2.0.3 | Supported, behaves as documented | 2026-08-29 |
| 25.8.7.3 | Supported, behaves as documented | 2026-07-29 |
Executed test cases
Excel for the web (executed 2026-09-01 via OneDrive recalculation)
These values come from Excel for the web, not from desktop Excel. They are two different implementations of the calculation engine, and this run measured only the web one: the corpus was uploaded to OneDrive as .xlsx, recalculated by Excel for the web on open, and downloaded again for readback. Excel for the web is a rolling service with no pinnable version, so the run is identified by its date. Where a value here disagrees with the Expected column — which is Microsoft’s documentation of the desktop product — we cannot tell you whether the web engine diverges from the desktop one or the documentation is wrong about both, because we do not run desktop Excel.
| Formula | Description | Result | Expected | Verdict |
|---|---|---|---|---|
| =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 | -8ProvenancePer 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.14Provenance3.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 | 12300ProvenanceNegative num_digits zeroes out the last 2 digits of the integer part without any rounding |
Matched |
Google Sheets (executed 2026-08-29 via Drive import)
Google Sheets is a rolling service with no pinnable version, so this run is identified by its date. The corpus was imported to Drive as .xlsx, recalculated by Sheets, and exported back for readback.
| Formula | Description | Result | Expected | Verdict |
|---|---|---|---|---|
| =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 | -8ProvenancePer 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.14Provenance3.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 | 12300ProvenanceNegative num_digits zeroes out the last 2 digits of the integer part without any rounding |
Matched |
LibreOffice Calc 25.8.7.3 (tested 2026-07-29)
| Formula | Description | Result | Expected | Verdict |
|---|---|---|---|---|
| =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 | -8ProvenancePer 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.14Provenance3.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 | 12300ProvenanceNegative num_digits zeroes out the last 2 digits of the integer part without any rounding |
Matched |
Docs & syntax
- Excel (desktop): official documentation
- Google Sheets: official documentation
- LibreOffice Calc: official documentation
Where TRUNC behaves differently
- CEILING, FLOOR & MROUND: Excel vs LibreOffice rounding
Rounding to a multiple with negative numbers: what the legacy CEILING/FLOOR Mode argument does, why the documented default divergence did not reproduce in four LibreOffice builds, and the #NUM! vs #VALUE! split.