From the Social Security website:
Special Social Security Extra Earnings for Military Service Since 1957, if you had military service earnings for active duty (including active duty for training), you paid Social Security taxes on those earnings. Since 1988, inactive duty service in the Armed Forces reserves (such as weekend drills) has also been covered by Social Security.
Under certain circumstances, special extra earnings for your military service from 1957 through 2001 can be credited to your record for Social Security purposes. These extra earnings credits may help you qualify for Social Security or increase the amount of your Social Security benefit.
Special extra earnings credits are granted for periods of active duty or active duty for training. Special extra earnings credits are not granted for inactive duty training.
If your active military service occurred
From 1957 through 1967, we will add the extra credits to your record when you apply for Social Security benefits.
From 1968 through 2001, you do not need to do anything to receive these extra credits. The credits were automatically added to your record.
After 2001, there are no special extra earnings credits for military service.
How You Get Credit For Special Extra Earnings
The information that follows applies only to active duty military service earnings from 1957 through 2001. Here's how the special extra earnings are credited on your record:
Service in 1957 Through 1977
You are credited with $300 in additional earnings for each calendar quarter in which you received active duty basic pay.
Service in 1978 through 2001
For every $300 in active duty basic pay, you are credited with an additional $100 in earnings up to a maximum of $1,200 a year. If you enlisted after September 7, 1980, and didn't complete at least 24 months of active duty or your full tour, you may not be able to receive the additional earnings. Check with Social Security for details.
Note: Change in special military service credits.
In January 2002, Public Law 107-117, the Defense Appropriations Act, stopped the special extra earnings that have been credited to military service personnel. Military service in calendar year 2002 and future years no longer qualifies for these special extra earnings credits