Home > Software design >  How calculate success (in %) related to amount?
How calculate success (in %) related to amount?

Time:10-09

Want know the success (in percentage) of a software update advertising between all my clients.

I have the following formula, but i think that something is wrong (based in preliminary result), see:

$success = round((($total_pcs_with_new_version)   (($total_pcs_with_old_version)))/100, 2);

/**

[====== Preliminary result ======]

$total_pcs_with_new_version = 13;
$total_pcs_with_old_version = 23

then result will be:

$success = 0.36%

**/

CodePudding user response:

Your calculation isn't correct:

$success = round($total_pcs_with_new_version * 100 /
                ($total_pcs_with_new_version   $total_pcs_with_old_version), 2);
  • new * 100 / total
  • 13 * 100 / 36 = 36.11
  • Related