Apple Notes can evaluate calculations with variables that update as you change them.
The variable name has to be “one word,”
so usual camelCase or PascalCase will likely do you best.
I realized this while trying to calculate what height TV bench I should get:

The center of the TV should be about eye level, so what height bench should I get given myself and the sofa? Seems around 60cm will be good. Update: I realized the TV stand adds to the height of the TV bench, so it shouldn’t be part of the center of TV calculation.
Annoyingly, you can’t declare a variable and see its result in one step. I found two options for this, and you decide which you prefer.
If you’re okay with an extra line you can show it by declaring the variable again, just let notes fill in the part after the =:
Or, instead, write the calculation first, and let Notes show the result, then add the variable name.
First, do the calculation:
Second, name the variable by adding the name and = at the front of the line:
I naturally ended up doing this second while I was working it through, since I wanted to see the result first, and then I named the variable.
Notes also handle some unit conversions for you:
I started on my phone taking Notes, and was surprised to realize I didn’t have to fire up Python on my computer to finish it. A new useful tool that I always carry with me. 🙂
Documentation links to Apple: