(A) An individual’s earnings for a taxable year shall be (i) the sum of his wages for services rendered in such year and his net earnings from self-employment for such year, minus (ii) any net loss from self-employment for such year.
(B) For purposes of this section— (i) an individual’s net earnings from self-employment for any taxable year shall be determined as provided in section 411 of this title , except that paragraphs (1), (4), and (5) of section 411(c) of this title shall not apply and the gross income shall be computed by excluding the amounts provided by subparagraph (D) of this paragraph, and (ii) an individual’s net loss from self-employment for any taxable year is the excess of the deductions (plus his distributive share of loss described in section 702(a)(8) of the Internal Revenue Code of 1986) taken into account under clause (i) over the gross income (plus his distributive share of income so described) taken into account under clause (i).
(C) For purposes of this subsection, an individual’s wages shall be computed without regard to the limitations as to amounts of remuneration specified in paragraphs (1), (6)(B), (6)(C), (7)(B), and (8) of section 409(a) of this title ; and in making such computation services which do not constitute employment as defined in section 410 of this title , performed within the United States by the individual as an employee or performed outside the United States in the active military or naval service of the United States, shall be deemed to be employment as so defined if the remuneration for such services is not includible in computing his net earnings or net loss from self-employment. The term “wages” does not include— (i) the amount of any payment made to, or on behalf of, an employee or any of his dependents (including any amount paid by an employer for insurance or annuities, or into a fund, to provide for any such payment) on account of retirement, or (ii) any payment or series of payments by an employer to an employee or any of his dependents upon or after the termination of the employee’s employment relationship because of retirement after attaining an age specified in a plan referred to in section 409(a)(11)(B) of this title or in a pension plan of the employer.
(D) In the case of— (i) an individual who has attained retirement age (as defined in section 416( l ) of this title) on or before the last day of the taxable year, and who shows to the satisfaction of the Commissioner of Social Security that he or she is receiving royalties attributable to a copyright or patent obtained before the taxable year in which he or she attained such age and that the property to which the copyright or patent relates was created by his or her own personal efforts, or (ii) an individual who has become entitled to insurance benefits under this subchapter, other than benefits under section 423 of this title or benefits payable under section 402(d) of this title by reason of being under a disability, and who shows to the satisfaction of the Commissioner of Social Security that he or she is receiving, in a year after his or her initial year of entitlement to such benefits, any other income not attributable to services performed after the month in which he or she initially became entitled to such benefits, there shall be excluded from gross income any such royalties or other income.
(E) For purposes of this section, any individual’s net earnings from self-employment which result from or are attributable to the performance of services by such individual as a director of a corporation during any taxable year shall be deemed to have been derived (and received) by such individual in that year, at the time the services were performed, regardless of when the income, on which the computation of such net earnings from self-employment is based, is actually paid to or received by such individual (unless such income was actually paid and received prior to that year).