Learn how to use the sqrt function in Notion formulas.

The sqrt() function returns the square root of its argument. sqrt() accepts only numbers.

sqrt(number) number.sqrt()
sqrt(16) /* Output: 4 */ 100.sqrt() /* Output: 10 */ sqrt(73-3^2) /* Output: 8 */

This example database uses the Pythagorean Theorem to solve for the missing side of any right triangle. Two of the three side lengths must be provided; the Calculator property will solve for the missing one.

Notion – The all-in-one workspace for your notes, tasks, wikis, and databases.
A new tool that blends your everyday work apps into one. It’s the all-in-one workspace for you and your team
if( empty( prop("Hypotenuse") ) and empty( prop("Side 1") ) or empty( prop("Hypotenuse") ) and empty( prop("Side 2") ) or empty( prop("Side 1") ) and empty( prop("Side 2") ), "Not enough information!", if( empty( prop("Hypotenuse") ), "Hypotenuse: " + format( round( sqrt( prop("Side 1")^2 + prop("Side 2")^2 ) * 100 ) / 100 ), if( empty( prop("Side 1") ), "Side 1: " + format( round( sqrt( prop("Hypotenuse")^2 - prop("Side 2")^2 ) * 100 ) / 100 ), "Side 2: " + format( round( sqrt( prop("Hypotenuse")^2 - prop("Side 1")^2 ) * 100 ) / 100 ) ) ) )

I’ll start this explanation off by saying that you can create a much simpler Pythagorean Theorem calculator that solves for the Hypotenuse only with: sqrt(prop("Side 1") ^ 2 + prop("Side 2") ^ 2).

The example above goes a few steps further. It rounds its answer to two decimal places using the round function (see that function’s page for tips on how to round to specific decimal places).

It also solves for any missing side of a right triangle, so long as the other sides have been provided.

The formula first checks to make sure there’s enough information to make a calculation. We use the empty function for this, and we must do so several times since we’re checking to see if any two of the three number properties are empty.

Good to know: The or operator has lower operator precedence than the and operator, so this part of the formula executes as (empty(prop("Hypotenuse")) and empty(prop("Side 1"))) or (empty(prop("Hypotenuse")) and empty(prop("Side 2"))).
In other words, all of the and clauses are executed before the first or clause.

After this error-checking stage, the formula uses a nested if-statement to determine the correct calculation to perform.

If the hypotenuse is missing, we use the following formula to solve for it, where Side 1 and Side 2 are \(a\) and \(b\) respectively:


If one of the sides is missing, we instead use this formula, where \(c\) is the hypotenuse, and \(b\) is the non-missing side:


Other formula components used in this example:

if – Thomas Frank
empty – Thomas Frank
and – Thomas Frank
or – Thomas Frank
format – Thomas Frank
round – Thomas Frank
add – Thomas Frank
multiply – Thomas Frank
divide – Thomas Frank
pow – Thomas Frank
About the Author

My name is Thomas Frank, and I'm a Notion-certified writer, YouTuber, and template creator. I've been using Notion since 2018 to organize my personal life and to run my business and YouTube channel. In addition to this formula reference, I've created a free Notion course for beginners and several productivity-focused Notion templates. If you'd like to connect, follow me on Twitter.

🤔 Have an UB Question?

Fill out the form below and I’ll answer as soon as I can! ~Thomas

🤔 Have a Question?

Fill out the form below and I’ll answer as soon as I can! ~Thomas