CalcTree allows you to create calculations that are aware of units of measurement. To learn more about the benefits of unit-aware calculations, read this article. Here, we explain how to use units in inputs and formulae in CalcTree.
Units in inputs
You can enter your desired unit alongside numbers in the input fields in CalcTree. For example, if you want to enter a quantity of 1 meter in an input field, you can type 1 m, like this:
type units along with numbers inside firmulae
Using units in math formulas
Mathematical formulas are simple calculation items on CalcTree. When composing formulas, you can use units of measurement to indicate quantities. For example, you can add two length quantities of one meter and one foot:
Units are carried over references
If you reference another parameter in a formula, units of that parameter will be considered in the calculations. For example, units of A and B are carried over into the formula in D:
Unit conversions
Units will be converted automatically inside a formula, for example, when adding and subtracting compatible quantities.
If you want to convert into a desired unit explicitly, you can use the to keyword in the formula:
Available units
CalcTree uses Math.js under the hood to handle units in Formulas. You can get the available units in formulas here on Math.js documents. What about units in Python?
🐍 In addition to math formulas, you can use units inside Python code on CalcTree. Learn more here Still have more questions?
Join the conversation on Slack below!