Photo credit to Mike from Pexels
The goal of this article is to make the case that driving costs a lot more than the cost of gas by looking at data from my accounting files on my spouse's Ford Focus.
This 2012 Ford Focus was purchased 2017-05-20 for $6,500 (plus taxes) from a personal friend. At that time it had 99,700 miles on the odometer. The car was totalled in a minor freeway crash on the first week of August 2019 with approximately 150,000 miles on the odometer. I would guess this is near the average US vehicle's odometer reading at scrappage. (I looked for a while for a reliable source on that number but could not find one. The average age of cars in the "Cash for Clunkers" program was 160k  but that data would exclude all the vehicles totaled significantly prematurely and vehicles whose scrapping was not subsidized by the government.) On 2019-08-08 it was sold as scrap for $300. It was my spouse's car so the data logging on the gas mileage is incomplete but the financial transactions are all accounted for.
It is common to hear people say "Oh, it only costs $20 worth of gas to get there." This is probably the most common misconception about driving. The degree to which driving costs more than gas depends on many decisions (how expensive is the car? what is the fuel economoy? how overpriced is the insurance? etc) Driving costs more than the gas by at least a factor of three. That said, for this particular car, gas cost $0.08 per mile but the total cost of driving was $0.36 per mile. For this car, gas was only 22% of the cost of driving.
There is always some debate when this is presented as to how reasonable it is to amortize these costs per-mile. Insurance charges per time period not per mile. However, the vehicle will last approximately the same number of miles whether those miles are driven over one year or ten. The maintenance cost will scale per-mile. And the insurance is the smallest contribution to the cost of driving. However, even if we consider strictly the expenses that scale on a per-mile basis, driving this cheap, used car was $0.31 per-mile and only 25% of that cost was gas.
If your gas costs are higher, or your fuel economy is lower, then the gas cost per mile will be higher. However, it is never as high as is commonly thought, particularly in relation to the amortization of the vehicle.
Here is the csv file I produced from my accounting records which contains all 225 transactions behind these numbers.
 "Life Cycle Environmental and Economic Impacts of 'Cash For Clunkers'," M.S. thesis, Dept of Natural Resources and Environment, Univ of Michigan, pp. 11, 2011.