The term “net earnings from self-employment” means the gross income derived by an individual from any trade or business carried on by such individual, less the deductions allowed by this subtitle which are attributable to such trade or business, plus his distributive share (whether or not distributed) of income or loss described in section
702
(a)(8) from any trade or business carried on by a partnership of which he is a member; except that in computing such gross income and deductions and such distributive share of partnership ordinary income or loss—
(17)
notwithstanding the preceding provisions of this subsection, each spouse’s share of income or loss from a qualified joint venture shall be taken into account as provided in section
761
(f) in determining net earnings from self-employment of such spouse.
If the taxable year of a partner is different from that of the partnership, the distributive share which he is required to include in computing his net earnings from self-employment shall be based on the ordinary income or loss of the partnership for any taxable year of the partnership ending within or with his taxable year. In the case of any trade or business which is carried on by an individual or by a partnership and in which, if such trade or business were carried on exclusively by employees, the major portion of the services would constitute agricultural labor as defined in section
3121
(g)—
(i)
in the case of an individual, if the gross income derived by him from such trade or business is not more than the upper limit, the net earnings from self-employment derived by him from such trade or business may, at his option, be deemed to be 662/3 percent of such gross income; or
(ii)
in the case of an individual, if the gross income derived by him from such trade or business is more than the upper limit and the net earnings from self-employment derived by him from such trade or business (computed under this subsection without regard to this sentence) are less than the lower limit, the net earnings from self-employment derived by him from such trade or business may, at his option, be deemed to be the lower limit; and
(iii)
in the case of a member of a partnership, if his distributive share of the gross income of the partnership derived from such trade or business (after such gross income has been reduced by the sum of all payments to which section
707
(c) applies) is not more than the upper limit, his distributive share of income described in section
702
(a)(8) derived from such trade or business may, at his option, be deemed to be an amount equal to 662/3 percent of his distributive share of such gross income (after such gross income has been so reduced); or
(iv)
in the case of a member of a partnership, if his distributive share of the gross income of the partnership derived from such trade or business (after such gross income has been reduced by the sum of all payments to which section
707
(c) applies) is more than the upper limit and his distributive share (whether or not distributed) of income described in section
702
(a)(8) derived from such trade or business (computed under this subsection without regard to this sentence) is less than the lower limit, his distributive share of income described in section
702
(a)(8) derived from such trade or business may, at his option, be deemed to be the lower limit.
For purposes of the preceding sentence, gross income means—
(v)
in the case of any such trade or business in which the income is computed under a cash receipts and disbursements method, the gross receipts from such trade or business reduced by the cost or other basis of property which was purchased and sold in carrying on such trade or business, adjusted (after such reduction) in accordance with the provisions of paragraphs (1) through (7) and paragraph (9) of this subsection; and
(vi)
in the case of any such trade or business in which the income is computed under an accrual method, the gross income from such trade or business, adjusted in accordance with the provisions of paragraphs (1) through (7) and paragraph (9) of this subsection;
and, for purposes of such sentence, if an individual (including a member of a partnership) derives gross income from more than one such trade or business, such gross income (including his distributive share of the gross income of any partnership derived from any such trade or business) shall be deemed to have been derived from one trade or business.
The preceding sentence and clauses (i) through (iv) of the second preceding sentence shall also apply in the case of any trade or business (other than a trade or business specified in such second preceding sentence) which is carried on by an individual who is self-employed on a regular basis as defined in subsection (h), or by a partnership of which an individual is a member on a regular basis as defined in subsection (h), but only if such individual’s net earnings from self-employment as determined without regard to this sentence in the taxable year are less than the lower limit and less than 662/3 percent of the sum (in such taxable year) of such individual’s gross income derived from all trades or businesses carried on by him and his distributive share of the income or loss from all trades or businesses carried on by all the partnerships of which he is a member; except that this sentence shall not apply to more than 5 taxable years in the case of any individual, and in no case in which an individual elects to determine the amount of his net earnings from self-employment for a taxable year under the provisions of the two preceding sentences with respect to a trade or business to which the second preceding sentence applies and with respect to a trade or business to which this sentence applies shall such net earnings for such year exceed the lower limit.