title: Calculating Discount Percentage of a given discounted price
body: <p>I am trying to find out the discount amount of a price. </p>
  
  <p>The cost of item WAS £50.00
  Sale Price £25.00
  Discount = %50</p>
  
  <p>However when use this formula below in PHP it doesnt give me the correct Discount percentage.</p>
  
  <pre><code>$percent = $rowx-&gt;Orgprice - $rowx-&gt;SalePrice / 100;
  $percent =  50 - 25 / 100 = 49.75; 
  $percent =  50 - 20 / 100 = 49.8;
  </code></pre>
  
  <p>All above percentages are wrong.</p>