Stock Percent Change Calcualte

Ok, this should be easy but this script only works in returning a correct % change if the stock change is higher than the current stock.
Guess I’m missing something simple here.

Any help?

Thanks,

Carl

set newStock to 100
set currentStock to 50
set theDifference to (newStock - currentStock)
set currentStock to (theDifference / currentStock)
set theStock to (currentStock * 100)
return theStock

edit: Doh!, the script works better than my little brain. Sorry, I believe it does work.

Is this what you want?

set newStock to 40
set currentStock to 50
set theChange to (newStock / currentStock - 1) * 100
set theChange to theChange & "%" as text

Perfect, thanks.

Carl