How variable operations work
Token Tools lets you define mathematical relationships between variables. Instead of manually updating every derived value when a base token changes, you write a formula once in the variable’s description field — and the plugin resolves it into an actual value.
Supported syntax
Write formulas using calc($variable_name [operator] number) in the description field of a Figma variable.
Supported operators: + - * /
Examples:
calc($spacing * 2)
calc($radius + 4)
calc($base_size / 1.25)
calc($line_height - 0.2)
If your variable name contains spaces, replace them with underscores.
e.g. a variable namedbase size→calc($base_size * 1.5)
Apply calculations
Once your formulas are written in the description fields, open the plugin and press Calculate variables at the bottom of the UI.
Two modes are available under Tokens → Variable calculations:
- Update once — runs all calculations a single time. If you edit a formula, press it again to recalculate.
- Start monitoring — continuously watches for changes in variable descriptions and recalculates automatically. Press Stop monitoring to end the session.
Note: Monitoring runs continuously and may consume additional CPU resources. On slower machines, Update once is the recommended option.
Free plan limitation: The free plan supports a limited number of calculations per day. Upgrade to PRO for unlimited calculations. [PRICE]