How can you use VB to work out percentages?

I want it to be able to give a percentage of RAM free, based on total amount of RAM and amount of RAM free. (for example, a system with 128MB RAM has say 20MB RAM free - how can you work out a percentage in VB to put in say, a progress bar?)

Thanks for any info.