Calculating percent of a given quantity