Variable operations in figma

To do operations between variables you can use calc($var_name [operation] number) in the variable description.

Variable operations in figma

You can do addition, subtraction, multiplication and division.

e.g: calc($radius * 1.4)

If the name of your variable has spaces, replace them with underscore _,

e.g: calc($var_with_space + 1.4)

Apply operations

To apply the operations you must go to the plugin UI and in the “Variable calculations” section you have two options:

Start monitoring: This option will be listening all the time for changes in the variable descriptions and will automatically apply the operations until you press Stop monitoring.

Update once: It will do the calculations only once, if you make a change in the operations you will have to press this button again to recalculate.

Important note: The monitoring may consume resources of your computer, if your computer is not very fast it is best to use update once.