A $30,000 car creates a deceptively simple choice: hand over the cash and own it outright, or borrow the money and leave $30,000 invested. The answer depends less on whether investments can earn more than the loan rate and more on what happens to cash flow, risk, taxes, and the money that actually stays invested.
The comparison gets especially interesting because a projected investment return is not the same thing as a guaranteed borrowing cost. A lender still expects every payment, even if the stock market has a terrible year. That makes this decision less about finding a magic interest-rate cutoff and more about deciding how much risk belongs in the car purchase.