API version: 0.3.0

---

# Number

`number` holds any number, whole numbers and numbers with a fraction.

| Value           | Example |
| --------------- | ------- |
| any JSON number | `21.5`  |

## Settings

This type has no settings of its own, it supports the [settings of every property](/reference/schemas.md#properties).

## Storage

| Database      | Stored as               | Notes                                                                                                                           |
| ------------- | ----------------------- | ------------------------------------------------------------------------------------------------------------------------------- |
| Neo4j         | native `FLOAT` (64 bit) | (default)                                                                                                                       |
| MongoDB       | `double`                | with `"storage": "document"` or the [placement role](/reference/schemas/placement.md#placement-roles) `scalar` moved to MongoDB |
| Elasticsearch | `double`                | search copy, see below                                                                                                          |

The [search copy](/reference/databases/elasticsearch.md) is written unless the property or the type sets `"search": false`.
Where a property is stored is explained in [placement](/reference/schemas/placement.md).

## Indices

`exact`, see [indices](/reference/indices.md). Nested properties can be indexed as well, see
[nested properties](/reference/indices.md#nested-properties).

## Limits

Numbers are stored as 64 bit floating point numbers (IEEE 754), very large whole numbers lose precision. Use `integer`
for counters and ids.

## Example

Schema:

```json
{
  "type": "number",
  "index": "exact"
}
```

Input and output:

```json
{
  "data": {
    "value": 21.5
  }
}
```

---

Home: [Ember Nexus API docs](/index.md)

Full site map: [llms.txt](/llms.txt)

Previous: [Integer](/reference/schemas/types/integer.md)

Next: [String](/reference/schemas/types/string.md)
