Social Security matches the name and Social Security number (SSN) on each Form W-2 against its database of all SSNs issued. ... The earnings history is the basis for determining an employee's future eligibility and benefit amount for Social Security's retirement, disability, and survivors programs.