As you approach your retirement date, it's time to start getting more exact with your planning. A big part of any retirement plan is Social Security. While there may be debate around the optimal time to file and various claiming strategies to optimize your finances, there's one thing you must check, regardless of when or how you claim.

You need to be sure the Social Security Administration (SSA) has properly accounted for all your past earnings.

Two Social Security cards laid on top of a pile of cash.

Image source: Getty Images.

Check your earnings record

The Social Security Administration previously mailed out statements to everyone each year. Now that Americans have increased access to the internet, the SSA defaults to offering that information online only.

In order to get your earnings record, you'll need to create a Social Security account online at ssa.gov/myaccount. All you need is an email address, your Social Security number, and your mailing address.

Once you're logged in, you'll see an option to download your Social Security statement. You can also scroll down and find a link to your full earnings record, where you can see more details about your wages, such as who your employer was.

Look over the report to see if all the numbers look right. A big flag may be a year in which your reported Social Security wages were $0. But some mistakes might not be as obvious.

It's important to note that your Social Security wages and your actual wages might not line up exactly. That could be because certain wages are excluded from Social Security, like your health-insurance premiums or health savings account (HSA) contributions. It could also be that you earned above the wage limit for Social Security, which changes every year.

If everything looks right, thank your lucky stars, and go ahead and claim Social Security when you're ready. If you spot an error, you'll want to get that corrected as soon as possible.

How to correct an error

In order to correct an error on your earnings record, you'll need to gather proof. This could come in the form of a tax return, W-2, or even an old paystub. Be sure to subtract any wages that wouldn't be eligible for Social Security when you check your proof against what's reported by the Social Security Administration.

Once you've found evidence of an error in your earnings report, you need to submit a request for correction through the ssa.gov website or contact the SSA and set up an appointment at your local office. Most corrections can be done online, but you'll need to contact the SSA if you're disputing self-employment wages and in certain other cases.

Once you've submitted all your documents to the SSA, you just have to wait for your case to get processed and for them to update your earnings record. That could take months.

There's technically a time limit

It's important to note that there's technically a limit as to how far back you can go to make a correction in your earnings record. According to the SSA, "An earnings record can be corrected at any time up to three years, three months, and 15 days after the year in which the wages were paid or the self-employment income was derived."

But there are some notable exceptions to this rule. You can go back more than three years for a lot of reasons detailed on the ssa.gov website. The biggest reason you might not be able to go back beyond three years is if you're self-employed and failed to file your taxes by the deadline.

It's a good idea to check your earnings report regularly. Not only will you definitely be within the time limit, you're also more likely to have archives of your tax returns or W-2s readily available. But even if you're nearing retirement, it's not too late to make sure everything looks right before you file for benefits.