Divide total amount spent by total gallons bought:
47.82 / 16.9 = $2.83 per gallon
9.5m questions
12.2m answers