Percentage calculation

How can I calculate the difference as a percentage of two different numbers in the block section? (For example, a product that costs 10 usd becomes 12 usd. I want to show the difference as a percentage.)

As far I understand you

Price increased = 2$
Older Price = 10$
New Price = 12$

Price increases by % = 2 × 100/10 = 20% (In respective for older price).

Price increases by % = 2 × 100/12 = 16.66% (In respective for new price).

I hope now you can convert it in blocks.


Something like this


You should really learn some basics before asking questions here. There are many good sources for this, including and in particular:


thank you i keep learning

1 Like

what can i do to get it reflected on label1 when a button is clicked

Set set label1.text to call procedure


I got error. First number is beginner level, second number is current level

1 Like

First value contains $ sign so it is not concidered a number

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.