Adding value to items based on weight

Value=(price per one weight unit) * weight units of material.

If you have a metal like iron and it’s worth 5$ per kg, but you only have 0.3kg of it, you would have a value of 5*0.3=1.5$ worth.