how to calculate your rate