# Create a variable formula

Use variable formulas to add more
intelligence to your custom components. Variable formulas always begin with the equal sign
(`=`). At its simplest, a formula can be a simple dependency
between two variables, stating that P2 equals half of P1 (`P2=P1/2`),
for example. To create more complex calculations, you can use functions and operators inside
the formula. For example, you can add mathematical expressions, **if** statements,
references to object properties, and so on. When you create formulas, note that
multiplication is faster than division, for example, `P1*0.5` is faster
than `P1/2`.

The following example shows how to create a formula that sets the weld size to half the thickness of the secondary part flange. When the component is used in a model, Tekla Structures will use the thickness of the secondary part flange to calculate the size of the weld.