---
title: "math:format — Format number"
description: "iXML command math:format: Format number."
canonical_url: "https://www.zeyos.com/ixml/ref/math-format"
markdown_url: "https://www.zeyos.com/ai/guide/ixml/ref/math-format.md"
section: "ixml-reference"
authority: "reference"
language: "en"
source_repository: "https://cloud.zeyos.com/__doc/ixmldoc.xml"
source_sha256: "a23f04e6a98628ca3c273c3b8dd2c33c034cfda3e0f00478d8793074fd2f70dd"
---

# math:format — Format number

MATH:FORMAT returns the formatted representation of a value with a fixed number of decimal digits and grouped thousands.

### Attributes
| Name | Type | Default | Description |
| ---- | ---- | ------- | ----------- |
| var | var |  | Result variable name |
| countdec | int |  | Number of decimal digits |
| decpoint | string | . | Decimal point |
| separator | string | , | Thousands separator |

### Children
- (none)

### Parents
- (not restricted in the reference)

### Result
- binding: var; type: string

### Examples

```xml
<output>
	<math:format countdec="2">1792702.213482971852</math:format>
</output>

<!-- 1,792,702.21 -->
```
