> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cradl.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Numeric

> Turn numbers written any way into a plain, consistent number.

The **Numeric** formatter turns a number as written in the document into a plain number: no currency symbols, no spaces, no thousand separators, and `.` as the decimal separator.

```
1 234,56   ->   1234.56
USD 1,234   ->   1234
```

## Options

| Option | What it does |
| - | - |
| **Numeric type** | **Float** keeps decimals, **Integer** rounds to a whole number. |
| **Limit number of decimals** | Rounds to the given number of decimals and pads with zeros, so `2` turns `1234.5` into `1234.50`. Without it, trailing zeros are dropped — `1000.00` becomes `1000`. |
| **Decimal separator on ambiguity** | Which of `.` or `,` to read as the decimal separator when the value could be read either way. See [Ambiguous separators](#ambiguous-separators). |

## How values are read

Anything that is not a digit, separator or minus sign is removed first, so currency codes, symbols and stray text do not matter. A minus sign is kept only at the start.

When a value contains **both** `.` and `,`, the last one is the decimal separator:

| Value | Becomes |
| - | - |
| `1,234.56` | `1234.56` |
| `12.345,67` | `12345.67` |
| `1.234.567,89` | `1234567.89` |
| `USD 1 000.00` | `1000` |
| `-1 000` | `-1000` |

### Ambiguous separators

When only one separator is present it may be either a decimal or a thousand separator. The formatter guesses from the digit grouping: a separator followed by exactly three digits is read as a thousand separator.

| Value | Default | With separator set to **Period** |
| - | - | - |
| `1,5` | `1.5` | `1.5` |
| `1.234` | `1234` | `1.234` |
| `1234.567` | `1234567` | `1234.567` |

<Warning>
  The default is the right guess for `1.234` meaning one thousand two hundred and thirty-four, and the wrong one for a value with three decimals such as `1234.567`. If your documents have three-decimal numbers — unit prices, weights, exchange rates — set **Decimal separator on ambiguity** to the separator your documents actually use.
</Warning>

## When it fails

If the value cannot be read as a number at all, the field is cleared and the formatter reports `Unable to parse <value> as a number`. The document then goes to human review. An empty value is left empty without an error.
