The styles are "plain", "commas" (thousands grouped), "percent" (0.5 is 50%), "compact" (1.2K), "bytes" (1.5 MB) and a currency code such as "USD"; places fix the decimals. The words and separators are the reader's language's, so "commas" groups 1,234.5 in English and 1.234,5 in German. The result is text: to keep a number that sorts and sums, set the property's display instead.
Syntax
formatNumber(number, style, places?)Arguments marked ? are optional. An ellipsis (…) allows more arguments.
Try an example
formatNumber(Words, "commas", 2)Returns "1,200.00" (text).
Change the example note’s properties
Run the expression to see its result here.
Date examples use 9 October 2026, 12:00 UTC. Examples run in your browser using Shelf’s formula engine.
Use it in your library
The example names the sample note’s properties. In the app, the formula editor shows the same example with your library’s own properties. Write a property name with spaces as prop("Target words"). The formula language reference explains values, operators, and lists.