Under IRS Code Section 1341(a), a taxpayer can utilize a deduction when a taxpayer restores a substantial amount held under a claim of right “if (1) an item was included in gross income for a prior taxable year (or years) because it appeared that the taxpayer had an unrestricted right to such item; (2) a deduction is allowable for the taxable year because it was established after the close of such prior taxable year (or years) that the taxpayer did not have an unrestricted right to such item or to a portion of such item; and (3) the amount of such deduction exceeds $3,000, then the tax imposed by this chapter of the taxable year shall be the lesser of the following: (4) the tax for the taxable year computed with such deduction; or (5) an amount equal to (A) the tax for the taxable year computed without such deduction, minus (B) the decrease in tax under this chapter (or the corresponding provisions of prior revenue laws) for the prior taxable year (or years) which would result solely from the exclusion of such item (or portion thereof) from gross income for such prior taxable year (or years).
A taxpayer may be entitled to relief if in one year the taxpayer included an item as gross income and paid tax on that income, then in a subsequent year is compelled to return the item. However, a taxpayer must be entitled to the deduction under some other provision of the IRS Code since Section 1341 does not independently create a deduction.
Interesting enough, Section 1341 is not necessarily foreclosed to taxpayers who earn income through illegal means. In Wang v. Commissioner, 76 T.C.M. (CCH), T.C. Memo. 1998-389, the tax court observed that taxpayers with illegal income may be able to show a claim of right “if the taxpayer appeared to have an unrestricted right to the income in the year of receipt.
Nothing herein constitutes tax advice and all are advised to seek competent tax counsel before filing any returns.
 Griffiths v. United States, 54 Fed. Cl. 198, 201 (2002) citing Culley v. United States, 222 F.3d 1331, 1334 (Fed. Cir. 2000).
 Treas. Reg. § 1.1341-1(a)(1)
 See United States v. Skelly Oil Co., 394 U.S. 678, 683 (1969).