Given the cost of college, many students have no choice but to borrow money to finance their degrees. But before you sign up for a loan, consider how long it'll take to pay off that debt and whether the money could be put to better use. Of course, the amount of time it takes to pay off your student loan will depend on how much you borrow and earn after college, so if you're wondering whether you're getting in over your head, we have a tool that can help.

Image source: Getty Images.

Are you borrowing too much?

Americans aren't too shy about borrowing money for college. An estimated 43 million Americans are carrying a collective $1.3 trillion in loans, and student debt is the only type of consumer debt that hasn't decreased since the 2008 recession. The average class of 2016 graduate who borrowed money to pay for college came away with more than $37,000 in student loans, up 6% from the previous year. Meanwhile, the average 20- to 30-year-old makes a $351 monthly student loan payment, which is hardly a small amount.

It's easy to look at college costs and think, "Wow, that's just not worth it." But consider this: The average college graduate earns just over $57,000 a year, while the average worker with only a high school diploma earns just over $34,000. What this means is that if you're smart about borrowing, then your salary could more than make up for your debt. But if you make the mistake of taking on too much debt, you may get less of a return on your investment. Worse yet, you risk running into trouble when the time comes to repay what you owe.

Crunching the numbers

Before you borrow money for college, it's important to gauge your ability to repay your loans, and that's where the following calculator comes in handy:

 

* Calculator is for estimation purposes only, and is not financial planning or advice. As with any tool, it is only as accurate as the assumptions it makes and the data it has, and should not be relied on as a substitute for a financial advisor or a tax professional.

To use this tool, you'll need to input your anticipated income after graduating, the amount you're thinking of borrowing, the interest rate on your loan, and your loan's payback period (which is commonly 10 years). Now, that first part is a bit tricky, because your income will depend heavily on the field you choose. But if you use $57,000, the average college grad's salary, as a starting point, then you can see how different borrowing scenarios might pan out.

Let's say, for instance, that you're looking at borrowing $37,000 for college at 5% interest, with a 10-year repayment period. Assuming a post-college salary of $57,000, your estimated monthly loan payments will be $392, or 8.3% of your salary, which is pretty high. That's why it pays to play around with different numbers and arrive at a figure whose post-college payments won't be quite as much of a drain on your salary.

Are you putting yourself at risk?

The biggest danger of borrowing too much is being unable to repay your loans once you graduate. The federal loan default rate is now over 11%, and if you join the many Americans who can't repay what they owe, you'll face serious repercussions. Not only could you potentially get sued, but a student loan default will stay on your credit report for seven years. During that time, you may have difficulty getting an apartment lease, mortgage, or auto loan.

Not only that, but defaulting on a student loan could compromise your ability to obtain or retain a job. Some companies check prospective employees' credit reports before extending offers, and if yours has a black mark, you could lose out on a job you would've otherwise had. Furthermore, anyone who defaults on a student loan is not allowed to work for a federal agency, and if you're already a government employee at the time, you could face suspension or lose your job entirely.

Even if you don't default on your loans, the higher your payments, the more you may have to give up, whether it's a nicer apartment, a yearly vacation, or the chance to sock away money for retirement. In fact, a Morningstar report found that every dollar of student debt you accumulate will decrease your retirement savings by $0.35 no matter how much you earn post-college. Take on too much debt, and you just might compromise the comfortable retirement we all want.

While it's easy to be enticed by the promise of a top-notch university that boasts amazing on-campus life, in the long run, there's a good chance you'll be better off going the less expensive route. Attending an in-state public university over a private one could save you $23,000 a year in tuition costs, and living at home as opposed to on campus could cut your annual expenses by $10,000. At the end of the day, your degree is what you make of it, and the less debt you come away with, the more financial flexibility you'll have once your college years are behind you.

Try any of our Foolish newsletter services free for 30 days. We Fools may not all hold the same opinions, but we all believe that considering a diverse range of insights makes us better investors. The Motley Fool has a disclosure policy.