You lose all of that and more on depreciation in the first two years.
I buy older than most people; currently my newest car is a 2009. I do maintenance and routine repairs myself, and I lose almost nothing on depreciation. But you can still come out ahead by buying 4-6 years old and letting the original buyers take the bulk of the depreciation losses.