The federal government spends $23 billion on higher education tax credits, but nearly 40 percent of undergraduates are not eligible to receive them. (Daniel Acker/Bloomberg)

Gather up your W2s. It’s tax time! Actually, you probably need a few more forms than just a W2, especially if you have student loans or you’re paying for college. There are all sorts of education tax credits and deductions, but there are also a couple of things you need to keep in mind before you try to claim them.

Class Credit: Let’s start with the fun part, saving money. Education tax credits and deductions can reduce the amount of money you owe or improve your chances of getting a refund. There are two types of credits: the American Opportunity Tax Credit and the Lifetime Learning Credit.

The AOTC offers a maximum annual credit of $2,500 per student for the first four years of college. It can be claimed by parents paying for their child’s undergraduate degree or by working students paying their own way through school. Either way, the student must be enrolled at least part-time in a program leading to a degree or certificate to qualify. The credit can be applied to books, supplies, tuition and fees. To get the full credit, a single taxpayer must make less than $80,000, but for partial credit you can make up to $90,000. Married filing jointly? Your combined income must be less than $160,000 for the full credit, or $180,000 for partial credit.

The best part of this credit is that it’s refundable, so if you don’t owe any taxes you could receive a refund of up to $1,000 for paying tuition and fees.

Unfortunately, that’s not the case with the Lifetime Learning Credit. Not only is that credit not refundable, it also only offers up to $2,000 per tax return. What’s more, the income limits are lower than the AOTC. You must make less than $65,000 if you are single, or less than $130,000 if you are married.

The good news about the Lifetime Learning Credit is that it’s applicable for undergraduate as well as graduate and professional degrees. And there is no limit on the number of years you can claim it, a good feature for PhD candidates. What’s more, you are also eligible if your spouse is the student and you’re filing jointly.

You can’t claim both credits at the same time. And transportation, insurance, and room and board do not qualify as education expenses.

Forms Needed: You should receive a 1098-T tuition statement from the college where you or your child is enrolled. Use the information on that statement to fill out the 8863 form and submit it with your 1040.

Delightful Deductions: Credits aren’t the only way you can use education expenses to reduce your tax bill. Through the Tuition and Fees Deduction, parents, students and even spouses can use up to $4,000 of expenses to lower taxable income. What qualifies as an education expense is limited to tuition, fees, books, equipment and supplies that your school requires as a condition of enrollment. Individuals earning less than $80,000 and married couples earning less than $160,000 can take advantage of this deduction.

If you are sending money to Navient, Great Lakes or any other loan servicer to repay your student loans, you could be eligible for this next deduction. The Student Loan Interest Deduction can reduce your tax burden by up to $2,500 if you paid interest on the debt.

You must have been enrolled at least part-time when you took out the loan, which must be in your name. You cannot claim this deduction if your parents claim you as a dependent on their tax returns. But even if mom and dad are giving you some money to repay your debt, you can claim the deduction as long as they’re not claiming you, said MaryAnn Monforte, an accounting professor at Syracuse University.

“If your folks or grandparents want to give you a little check to put towards your student loans, don’t put it in your savings account, take advantage of getting that interest deduction,” she said. “It’s one of the last interest deductions you have available without having to itemize your deductions.”

Refinanced your student loans? Don’t fret, you still qualify for the deduction, said Stephen Dash, chief executive of Credible, a marketplace for student loans that recently released a college tax guide. Singles earning less than $80,000 and married couples earning less than $160,000 can take advantage of this deduction. Keep in mind that if you are married and filing jointly, you are only eligible for one deduction.

“Depending on your tax bracket, you could ultimately save $625 if you’re in the 25 percent tax bracket, or $375 if you’re in the 15 percent tax bracket,” Dash said.

Forms Needed: Just like with the tax credits, you’ll need the 1098-T to claim the tuition and fees deduction. And the interest deduction? You should receive a 1098-E form detailing the amount of interest paid on your student loans for the year. That amount is then used to calculate the interest deduction, which amounts to $100 on average.

Love, Marriage and Taxes: Now for the not so fun part: tax implications for the legally bound. If you’re married and filing jointly, your combined income could affect your monthly payments for income-driven student loan plans. Student-loan servicers, the middlemen who collect and apply payments to debt, will use your combined earnings to calculate your payments under the Pay As You Earn and the income-based repayment plans, which cap payments at 10 percent and 15 percent of your income, respectively.

If you file separately, only your income will be considered in the calculation. But be careful: Filing separately as a married couple has limitations. If you itemize deductions, your spouse cannot claim the standard deduction, so you both would have to itemize or use the standard deduction. A married couple would also be ineligible for many tax credits, including education tax credits, student tax deductions and the earned income credit.

As for the latest income-driven repayment plan, Revised Pay As You Earn, and the granddaddy of them all, income-contingent repayment, loan servicers will use your combined income regardless of whether you file separately or together.

Real Talk: Parents and students saved about $17.9 billion in education credits and deductions in 2013, according to the College Board, which pegged the average family savings at about $1,460. Still, Sallie Mae’s annual survey on how families pay for college found that only 37 percent used tax credits and deductions to help cover tuition costs in the 2014-2015 academic year. A part of the problem is that low-income households — the ones who need the most financial help to attend college — pay relatively low federal taxes and therefore receive few benefits. There are also many Americans who are eligible for education credits and deductions but simply don’t know much about them. Hopefully, this helps.

Interested in financial planning? Check out:

For richer or poorer: a financial plan for newlyweds

How your family finances factor into financial calculations

This is the best way to save for college. And hardly anyone uses it.