Compare the total cost of leasing vs. financing a car over N years, simplified.
Leasing total cost = monthly lease payment × months. Buying total cost = loan payments over the period + any remaining loan balance, minus the car's resale value at the end (a rough proxy for equity).