--- title: "fn (Format number)" slug: "calc-function-fn" updated: 2026-05-12T12:29:46Z published: 2026-05-12T12:29:46Z canonical: "docs.lobstersoftware.com/calc-function-fn" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.lobstersoftware.com/llms.txt > Use this file to discover all available pages before exploring further. # fn (Format number) > [!NOTE] > Formats a number in the scheme of the current language. > > > [!TIP] > > Tooltip > > > > This info will only appear in the tooltip. Here only extremely short and concise! In general, please do not use images or links here. Tables are allowed. > > > > Syntax: *$fn(number,[precision=2[,integerDigits=1,[useThousandsSeparator=false]]])* > > > > | Parameter | Description | > > | --- | --- | > > | number | The number to be formatted. | > > | precision | The number of decimal places. | > > | integerDigits | The number of integers. | > > | useThousandsSeparator | Use thousand separator. | > > | keepUnits | If the value is a number with unit, the value will be appended to the result string. | ## Syntax *$fn(number,[precision=2[,integerDigits=1,[useThousandsSeparator=false]]])* ## Parameter | Name | Description | | --- | --- | | number | The number to be formatted. | | precision | The number of decimal places. | | integerDigits | The number of integers. | | useThousandsSeparator | Use thousand separator. | | keepUnits | If the value is a number with unit, the value will be appended to the result string. | ## Return value The formatted number. ## Examples | Syntax | Result | | --- | --- | | $fn(2.5,3) | 2,500 | | $fn(2.5,3,2) | 02,500 |