1---2title: "Decimal arithmetic"3sidebar_position: 54---56# Decimal arithmetic78Like Sheets and Excel, 012 computes in binary floating point, so9`=0.1+0.2-0.3` is 5.551E-17 rather than 0 and `=INT($4.35*100)` is 434.10Comparisons look only at the 15 significant digits a cell shows, as in11Sheets, so `=0.1+0.2=0.3` is TRUE, but `=0.1+0.2-0.3=0` is FALSE. File > Settings >12Decimal arithmetic (or search the palette for "decimal") switches the whole13file, every sheet of it, to decimal math for money. The status line then says14`decimal`, the menu shows a check mark, and the setting is saved with the15file and can be undone.16171819| Computed in decimal | Stays binary |20|---|---|21| `+ - * /` and postfix `%`; `SUM`, `AVERAGE`, `PRODUCT`, `SUMIF`, `SUMIFS`, `SUMPRODUCT`; `ROUND`, `ROUNDUP`, `ROUNDDOWN`, `TRUNC` | `^`, `SQRT`, statistics, finance, dates and everything else |2223Values are still stored as doubles. Each decimal step reads its inputs as the24shortest decimal that round-trips (what the cell shows), computes exactly25(division to 34 significant digits) with26[apd](https://github.com/cockroachdb/apd), and keeps the double nearest the27result, so comparisons, lookups and formats see `0.3` rather than28`0.30000000000000004`. Division still rounds: `=1/3*3` is 0.9999999999999999,29as in any decimal system. Displayed numbers are already rounded to 1530significant digits, so the setting matters for comparisons, `INT`/`MOD`-style31truncation and residues such as `=1.1-1-0.1`. Older builds ignore the setting32and compute in binary.