Show winning success rate based on wins/loses count
<p>I want to show the winning success rate between wins and loses I had a go with this</p>

<pre><code>$percent = ($row['wins'] - $row['loses'] / (($row['wins'] + $row['loses']/2))* 100);
</code></pre>

<p>based on <a href="http://www.calculatorsoup.com/calculators/algebra/percentagedifference.php" rel="nofollow">calculatorsoup.com</a> % difference calculator formula </p>

<blockquote>
  <p>Calculate percentage difference between V1 = 15 and V2 = 6</p>
  
  <p>( | V1 - V2 | / ((V1 + V2)/2) ) * 100</p>
  
  <p>= ( | 15 - 6 | / ((15 + 6)/2) ) * 100</p>
  
  <p>= ( | 9 | / (21/2) ) * 100</p>
  
  <p>= ( 9 / 10.5 ) * 100</p>
  
  <p>= 0.857143 * 100</p>
  
  <p>= 85.7143% difference</p>
</blockquote>

<p>but I think I'm going about it the completely wrong way, my goal is so output would be something like:</p>

<blockquote>
  <p>user bob has a success rate of: 17% </p>
</blockquote>
