In order to qualify for Social Security retirement benefits, you need to have a high enough earnings record to meet the minimum requirements. The problem is, not all kinds of income count as Social Security earnings. And if a large percentage of your income is from unqualified sources, your Social Security benefits could take a serious hit -- reducing your retirement income and making your golden years a lot less pleasant. That's why it's important to focus on types of income that can boost your benefits, including the three below.

How Social Security credits work

Work credits are the measuring stick that the Social Security Administration uses to decide whether you've accrued enough earnings to qualify for benefits. It takes a minimum of 40 work credits to qualify for Social Security retirement benefits. In 2017, you need $1,300 in earnings to qualify for a single credit, and you can earn up to four credits per year. However, not all types of income count for earning work credits. That's why it's important to make sure you're getting at least enough income from the following sources to accrue your four credits per year.

Stacked Social Security cards

Image source: Getty Images.

Salary up to the Social Security tax limit

If you look at your pay stub, you'll probably see that your employer has withheld Social Security taxes from your wages. However, these Social Security taxes may not be applied to your entire salary -- only the salary up to a certain annual limit, which can change from year to year. For 2017, the Social Security tax limit is $127,200. That means that your salary up to $127,200 is subject to Social Security taxes in 2017, and anything you make over that amount is not subject to these taxes.

This matters for benefits purposes because any salary you make over the annual limit doesn't count in your Social Security earnings record, so it won't increase your retirement benefits. However, this has little effect on work credits because you can only earn a maximum of four credits in a year anyway, and it only takes $1,300 in earnings (for 2017) to accrue a credit. Thus, if you're earning over $127,200 in salary, you've already accrued your four credits for the year.

Commissions and tips

Good news, salespeople: Commissions count as wages for Social Security purposes, so the commissions you earn will help you to accrue work credits and will also count toward your earnings record to increase your eventual retirement benefits amount. Cash tips of $20 or more per month also count toward work credits, but only if you report the income from those tips on your federal tax return (which you should be doing anyway).

Vacation pay and severance pay

If you're laid off with a severance package, at least you'll know that your Social Security benefits can go up as a result. Similarly, if you leave a job with accrued vacation pay and the HR department cashes out said vacation pay for you, this qualifies as wages and can earn you Social Security credits.

Not wages: Investment income

Having lots of dividends and interest pouring in to your investment accounts is definitely nice, but it won't help you out with Social Security. Investment income won't count toward work credits, and it also won't count as earnings, so it won't increase your Social Security benefits amount no matter how much investment income you have. Similarly, capital gains don't count for either credits or earnings.

Not wages: Gifts and loans

Any gift or loan you receive, even if it's from your employer, doesn't count as work credits or earnings for Social Security purposes. This is true whether the gift or loan is property or cash. However, an advance on future wages does count-as long as the future wages are a type of income that qualify.

Maximizing your Social Security benefits

Once you've earned your 40 work credits, you don't need to worry about earning more. However, it's still important to maximize your qualified sources of income so that you can also maximize your Social Security benefits. In order to calculate your retirement benefits, Social Security looks at the 35 highest-earning years of your life and then averages them out. If you've got less than 35 years of qualified earnings in your work record, or if some of those years had extremely low earnings, you'd be wise to work a little longer and add another year or two of high earnings to kick those years off your record.

For example, let's say you worked for 33 years and averaged $80,000 in qualified income for each of those years. When calculating your benefits, the folks at Social Security would add two zeroed-out years to give you the full 35 years for averaging. In that case, instead of having your benefits based on $80,000 worth of earnings, you'd get benefits based on just $75,429 worth of average earnings. Using the 2017 benefits formula, you'd end up with Social Security benefits of $2363 per month if you claimed them at full retirement age -- not bad, but less than the $2420 you'd get every month if you waited just two more years to retire. That's almost $700 extra per year for the rest of your life! 

Now you can see why it's important to have at least 35 years during your career of the highest possible income from qualified sources, so that you can get the biggest possible Social Security benefits.

The Motley Fool has a disclosure policy.