Calculate percentage saved between two numbers?

前端 未结 9 1562
自闭症患者
自闭症患者 2020-12-22 19:25

I have two numbers, the first, is the original price, the second, is the discounted price.

I need to work out what percentage a user saves if they

9条回答
  •  暖寄归人
    2020-12-22 19:51

    ((list price - actual price) / (list price)) * 100%
    

    For example:

    ((25 - 10) / 25) * 100% = 60%
    

提交回复
热议问题