26 USC 31 - Tax withheld on wages

(a) Wage withholding for income tax purposes 

(1) In general 
The amount withheld as tax under chapter 24 shall be allowed to the recipient of the income as a credit against the tax imposed by this subtitle.
(2) Year of credit 
The amount so withheld during any calendar year shall be allowed as a credit for the taxable year beginning in such calendar year. If more than one taxable year begins in a calendar year, such amount shall be allowed as a credit for the last taxable year so beginning.
(b) Credit for special refunds of social security tax 

(1) In general 
The Secretary may prescribe regulations providing for the crediting against the tax imposed by this subtitle of the amount determined by the taxpayer or the Secretary to be allowable under section 6413 (c) as a special refund of tax imposed on wages. The amount allowed as a credit under such regulations shall, for purposes of this subtitle, be considered an amount withheld at source as tax under section 3402.
(2) Year of credit 
Any amount to which paragraph (1) applies shall be allowed as a credit for the taxable year beginning in the calendar year during which the wages were received. If more than one taxable year begins in the calendar year, such amount shall be allowed as a credit for the last taxable year so beginning.
(c) Special rule for backup withholding 
Any credit allowed by subsection (a) for any amount withheld under section 3406 shall be allowed for the taxable year of the recipient of the income in which the income is received.