Don't get stuck in an oversized auto loan. Flickr/danzen A car is only as good as the places you drive it.

If you end up too broke to leave the driveway because you overspent on your car, it defeats the purpose of purchasing it in the first place.

Americans borrowed more money to buy cars than attend college last year, according to data from the Federal Reserve. Between the first quarter of 2016 and the first quarter of 2017, car buyers took out $96 billion worth of auto loans, $13 billion more than the total amount of student loan debt borrowed during the same time frame.

Knowing just how much to spend on a car can be confusing, especially if you're a first-time buyer. The question of auto affordability came up during a Facebook Live I recently hosted for Business Insider.

If you're going to take out a loan to pay for the car, I said, I would recommend limiting it to three, four years at most. And, if you can't afford to pay off the car in that time frame, then you can't afford the car.

On average, Americans finance $30,945 when buying a car, paying an average of $517 a month, based on recent research from Edmunds. That's not including insurance, gas, and maintenance.

Perhaps most concerning is the amount of time car buyers are on the hook for making those payments. Edmunds found that the average length of auto loans recently grew to a record 69.3 months — nearly six years — setting a new all-time high.

Having a reliable car is important, but you don't have to commit to paying $500 a month for the next six years to get one. As I cautioned during the Facebook Live, a lot of people end up in a position where they're paying far too much for their car payments.

Before buying a car, the question to ask yourself is how much you're willing to give up to pay for it. Every dollar you spend on transportation is money you can't spend on travel, or save toward retiring early. It might be nice to have a car with the latest tech features — like a backup camera or wireless charging capabilities — but it's not worth stretching your budget over.

There are lots of good, solid, used cars that you can read about online. Don't let a salesperson tell you what a good purchase is. Do the research on your own.

Most importantly, make sure that you set your budget ahead of time, so you can either pay cash up front, or pay the loan off in three to four years.

Watch the full Facebook Live: