Except as provided in subsection (g), a small business corporation may elect, in accordance with the provisions of this section, to be an S corporation.
For purposes of this subsection, an election for a taxable year made not later than 2 months and 15 days after the first day of the taxable year shall be treated as timely made during such year.
An election under subsection (a) shall be effective for the taxable year of the corporation for which it is made and for all succeeding taxable years of the corporation, until such election is terminated under subsection (d).
An election may be revoked only if shareholders holding more than one-half of the shares of stock of the corporation on the day on which the revocation is made consent to the revocation.
An election under subsection (a) shall be terminated whenever (at any time on or after the 1st day of the 1st taxable year for which the corporation is an S corporation) such corporation ceases to be a small business corporation.
Any termination under this paragraph shall be effective on and after the first day of the first taxable year beginning after the third consecutive taxable year referred to in clause (i).
A prior taxable year shall not be taken into account under clause (i) unless the corporation was an S corporation for such taxable year.
Except as otherwise provided in this subparagraph, the term “passive investment income” means gross receipts derived from royalties, rents, dividends, interest, and annuities.
The term “passive investment income” shall not include interest on any obligation acquired in the ordinary course of the corporation’s trade or business from its sale of property described in section 1221(a)(1).
If the S corporation meets the requirements of section 542(c)(6) for the taxable year, the term “passive investment income” shall not include gross receipts for the taxable year which are derived directly from the active and regular conduct of a lending or finance business (as defined in section 542(d)(1)).
If an S corporation holds stock in a C corporation meeting the requirements of section 1504(a)(2), the term “passive investment income” shall not include dividends from such C corporation to the extent such dividends are attributable to the earnings and profits of such C corporation derived from the active conduct of a trade or business.
The portion of such year ending before the 1st day for which the termination is effective shall be treated as a short taxable year for which the corporation is an S corporation.
The portion of such year beginning on such 1st day shall be treated as a short taxable year for which the corporation is a C corporation.
An election under this subsection shall be valid only if all persons who are shareholders in the corporation at any time during the S short year and all persons who are shareholders in the corporation on the first day of the C short year consent to such election.
For purposes of this subsection, the term “S termination year” means any taxable year of a corporation (determined without regard to this subsection) in which a termination of an election made under subsection (a) takes effect (other than on the 1st day thereof).
The taxable income for the short year described in subparagraph (B) of paragraph (1) shall be placed on an annual basis by multiplying the taxable income for such short year by the number of days in the S termination year and by dividing the result by the number of days in the short year. The tax shall be the same part of the tax computed on the annual basis as the number of days in such short year is of the number of days in the S termination year.
Subsection (d) of section 443 shall apply to the short taxable year described in subparagraph (B) of paragraph (1).
The short taxable year described in subparagraph (A) of paragraph (1) shall not be taken into account for purposes of determining the number of taxable years to which any item may be carried back or carried forward by the corporation.
The due date for filing the return for the short taxable year described in subparagraph (A) of paragraph (1) shall be the same as the due date for filing the return for the short taxable year described in subparagraph (B) of paragraph (1) (including extensions thereof).
Paragraph (2) shall not apply with respect to any item resulting from the application of section 338.
Paragraph (2) shall not apply to an S termination year if there is a sale or exchange of 50 percent or more of the stock in such corporation during such year.
If a small business corporation has made an election under subsection (a) and if such election has been terminated under subsection (d), such corporation (and any successor corporation) shall not be eligible to make an election under subsection (a) for any taxable year before its 5th taxable year which begins after the 1st taxable year for which such termination is effective, unless the Secretary consents to such election.