Convert a number to another number

Im trying to convert number 20 to 100, like a scale. 20 is the ammount of bullets, and 100 is the length of the GUI Box, but how do i scale the 20 to 100. So if i had 50 it would go to 100. For example :

0 is no ammo ( length ) = 0 bulelts
100 is full ammo ( length ) = 20 bullets

How?

So if maximum bullets = 20, and minimum = 0, you can get a percent value by doing (currentBullets / maximumBullets) * 100. An example of this would be currentBullets = 10, you’d do (10/20) * 100, giving you 50, or 50%.

so if max bullets is 20 then…

var Scale = 100/MaxBullets;
GUI.Box(Rect(0,0,BulletsIHave*Scale,20), "");

this should do

Edit : solved it, but my bullets cant be more than 100

Of course. If you have more than 100 bullets, then MaxBullets is not big enough!