Nope. Where you come out way ahead is that you pay $30,000 for a $30,000 car instead of $50,000 with interest. Take a long term view.
Well who takes a 25 year loan for a vehicle? Who would pay $20k in interest on a $30k car? Where are you getting your numbers?
I really don't think you understand what I'm saying dude.
My example:
I'm talking about a five year auto loan, where I'd pay say 2.5% interest through a credit union (easily doable through a credit union if not less for a brand new car). That comes out to $354.95/mo for five years, which after five years is a grand total of $21,297. That's a measly $1,297 in interest over five years, nowhere remotely near the $20k in interest you somehow arrived at.
Now, since I financed the car instead of paying cash for it, I have $20k to invest at the time I make my first car payment. Now if I throw that into an investment yielding say, 7% annually, and do absolutely nothing with it for five years, it grows to $28,051.30.
Now, the difference between $28,051.30 and $21,297 is $6,754.30.
So by financing the car at 2.5% and investing the $20k at 7% and doing nothing with it, I come out $6,754.30 ahead, meaning effectively I pay $13,245.70 for the car.
Total amount of money lost to interest on the auto loan: $1,297
Total amount of money gained on interest by investing: $8,051.30
Net interest profit: $6754.30
I made more on interest than I paid in interest over five years, making a net reduction in the true effective amount I paid for the vehicle.
Calculators used:
http://www.bankrate.com/calculators/auto/auto-loan-calculator.aspx
http://www.moneychimp.com/calculator/compound_interest_calculator.htm
Your example:
You pay $20k for a car outright. Car is bought and paid for, and you choose to invest the money that's not going out (what would otherwise be a car payment) over the next five years, adding to it monthly. So, you'd be investing $354.95/month for five years.
Using the same calculator, starting with a $0 principal and adding $354.95/mo for five years ($4,259.40/year) at the same 7%, you get $26,209.33 after five years, at the time my loan payments finish. To put in $354.95/mo--the amount that I spend each month by having a loan (the amount "going out" as you said)--you are investing $21,297, so your total amount of interest gained is $5,457.
You are actually investing MORE in principal than me, but getting less in net yield because putting $20k in on day one and leaving it will beat splitting that $20k (or in this case even a little more than $20k--putting in only $20k split over five years as opposed to the $354.95/mo "going out" makes the numbers even more in my favor) over five years because I'll clean up on compound interest.
Total amount of money lost to interest on an auto loan: $0 (since you paid for the car with cash)
Total amount of money gained on interest by investing: $5,457
Net interest profit: $5,457
Therefore:
$6754.30-$5,457=$1,297.30
Thus, by financing wisely at a credit union and investing at the same yield as you, I come out $1,297.30 ahead.
You keep talking about a long-term view but there is no need (nor would it make sense) to look at anything longer than the term of the auto loan, which the standard is five years.
Paying cash is NOT always the cheapest option.