javascript Math and css percentage

I have a progress div container and an xhr request posting base64 images to the server.

The progress indicator div looks as follows:

<style>
.progresscover {
 background: #eee;
 width:100%;
 height: 3px;
 position: relative;
 text-align: left;
 }
 .progress{
 width:0%;
 height:100%;
 background: purple;
 position:absolute:
 left:0px;
 top:0px;
 bottom:0px;
  }
</style>
<div class="progresscover"><div class="progress"></div></div>

from the XHR request i get following values
loaded: 102533, total: 703227
The loaded obviously changes till its equal to the total..

what is the math to increase the width of the “progress” bar incrementally in percentages?