Percentage discount calculation doesn't match my manual calculation #203044
Discussion TypeQuestion Discussion ContentHi everyone,
I calculated the final price myself, then checked it using calculator. Can someone explain the correct way to calculate a percentage discount step by step? Also, how should decimal values be rounded to get the correct final price? Thanks in advance! |
Replies: 1 comment
|
Your formula is correct. Convert 18% to decimal form by dividing by 100: 18% = 0.18 Then calculate the discount: $124.95 × 0.18 = $22.491 Subtract that from the original price: $124.95 − $22.491 = $102.459 or another option you can do is just do (1 - discount) * original price to get the final price. Since currency is normally displayed to two decimal places, round the final result to $102.46. The discount amount would display as $22.49. It is best not to round intermediate values. Keep the full precision during the calculation, then round the final monetary result to two decimal places. A one-cent difference can happen when a calculator rounds the discount before subtracting it or uses a different rounding rule. |
Your formula is correct. Convert 18% to decimal form by dividing by 100:
18% = 0.18
Then calculate the discount:
$124.95 × 0.18 = $22.491
Subtract that from the original price:
$124.95 − $22.491 = $102.459
or another option you can do is just do (1 - discount) * original price to get the final price.
Since currency is normally displayed to two decimal places, round the final result to $102.46. The discount amount would display as $22.49.
It is best not to round intermediate values. Keep the full precision during the calculation, then round the final monetary result to two decimal places. A one-cent difference can happen when a calculator rounds the discount before subtracting it or uses a…