The Number data type holds and represents numbers. Numbers can be used with mathematical operators such as add +
and divide /
to perform mathematical operations and calculations.
2 + 2 /* Output: 4 */
6 / 2 /* Output: 3 */
Code language: JavaScript (javascript)
Mathematical operations follow the standard mathematical order of operations (PEMDAS).
3 + 4 * 5 /* Output: 23 */
(3 + 4) * 5 /* Output: 35 */
Code language: JavaScript (javascript)
To learn more, see the guide on operator precedence and associativity:
![](https://thomasjfrank.com/wp-content/uploads/2023/03/Notion-Formula-Reference-by-Thomas-Frank-thumbnail.jpg)
Notion will automatically convert numbers with more than 21 digits to scientific notation when displayed in the formula property, but will display the full number in the formula editor:
![](https://thomasjfrank.com/wp-content/uploads/2023/03/spaces_RJdJj77lj2q3xwMdOCbK_uploads_E8EhGKDgZdlunjSrtiz5_Scientific-Notation-in-Numbers.webp)
See this in action in this example database:
![](https://www.notion.so/images/meta/default.png)
Automatic Number-to-String Conversion
Numbers will automatically be converted to strings if they are combined with other data types.
"There are " + prop("Members").length() + " members."
/* Output: "There are 12 members." */
["There are", prop("Member"),"members."].join(" ")
/* Output: "There are 12 members." */
Code language: JavaScript (javascript)