<aside> <img src="https://s3-us-west-2.amazonaws.com/secure.notion-static.com/a5a1e3ce-00fa-46e4-9a75-58c2aed9e8ce/Notion_Fundamentals_with_Thomas_Frank_-_Avatar_2021.png" alt="https://s3-us-west-2.amazonaws.com/secure.notion-static.com/a5a1e3ce-00fa-46e4-9a75-58c2aed9e8ce/Notion_Fundamentals_with_Thomas_Frank_-_Avatar_2021.png" width="40px" /> The example database below contains a formula that rounds the input number to several different decimal places.

Created by Thomas Frank | Learn Notion Formulas | Notion Basics | Templates | Twitter

</aside>

Decimal Rounding

// Compressed
"One Decimal: " + format(round(prop("Number") * 10) / 10) + "\\n Two Decimals: " + format(round(prop("Number") * 100) / 100) + "\\n Three Decimals: " + format(round(prop("Number") * 1000) / 1000) + "\\n Four Decimals: " + format(round(prop("Number") * 10000) / 10000) + "\\n Five Decimals: " + format(round(prop("Number") * 100000) / 100000)

// Expanded
"One Decimal: " + format(round(prop("Number") * 10) / 10) + 
"\\n Two Decimals: " + format(round(prop("Number") * 100) / 100) + 
"\\n Three Decimals: " + format(round(prop("Number") * 1000) / 1000) + 
"\\n Four Decimals: " + format(round(prop("Number") * 10000) / 10000) + 
"\\n Five Decimals: " + format(round(prop("Number") * 100000) / 100000)

© Thomas Frank