Skip to main content
A_Gussenberg
July 13, 2023

Calculation formula within variable input

  • July 13, 2023
  • 74 replies
  • 11482 views

Hey folks, first of all I love the new variable function. Within the setup of spacings I want to reference my base value (“8”) and do calculations, e.g. (spacing-base)*2". This works fine and the value is calculated properly within the input to add a new variable. But I expected not that the calculation string changes to the absolute value. With this behaviour I loose the connection/ reference to my base value and the calculation is some how obsolete.

Does anybody feel the same?
Will there be an update?

image

Thanks

74 replies

Josh_Gorman
New Member
February 6, 2025

I haven’t really used variables before in Figma, and was shocked that this wasn’t a feature already!

I am so used to parametric building in other applications that I stopped using the variables cause it just limited my need of them right there.

 

Please implement formulas in variable creation, and include the ability to pull property definitions like current frame height, width, etc.

Wael Bettayeb
New Member
February 16, 2025

Hello, I’ve could achieve it by creating an timeout component.
Here’s an example:

here’s the link:
https://www.figma.com/community/file/1472994351897468751

Ben_Gregory
New Member
April 2, 2025

I was expecting calculations when variables were first implemented, I’ve been constantly disapointed everytime I’ve checked only to see it’s still not. It would so useful for modular font-size scales, grid layouts, button padding on the x and y. I’m spending so much time making my tokens by manually entering values

raperez
New Member
April 5, 2025

So, are we getting this feature? We can't keep pretending REMs aren’t a thing, this is so needed in 2025

John_Fraskos
New Member
May 4, 2025

We definitely need this feature asap. It should not be so much complicated to implement, its a priority for a ton of users.

Travis_rea
New Member
May 13, 2025

Bummed that this is still not available. It makes scales a hassle. Rather than changing a scale multiplier and base integer in a variable I have to manually calculate everything…. still.  

Craig_Garner
New Participant
May 14, 2025

+1 this is a sorely lacking feature. Come on Figma, it can’t be that hard!

Martin_Schilde
New Member
May 20, 2025

^+1 sorely missed, this needs to be implemented. Just imagine putting down a variable matrix with a base font size for body text and then have all the headline sizes automatically be calculated from that according to another variable, like type scale factor:

factor = 1.2

p = 18 (px)

h6 = p × factor

h5 = p × factor²

h4 = p × factor³

etc etc

I would have one template with all the variables and I could kickstart all our projects. Please make this happen!

tjnz
New Member
May 29, 2025

+1

 

After just creating a boatload of spacing variables which could have been one calculation, this would be a relatively simple but hugely helpful addition.

Juan_Guzman
New Participant
June 24, 2025

+1 Waiting for this for 1 year