(A) Except as provided in subsection (q) and subparagraph (D) of this paragraph, such widow’s insurance benefit for each month shall be equal to the primary insurance amount (as determined for purposes of this subsection after application of subparagraphs (B) and (C)) of such deceased individual.
(B) (i) For purposes of this subsection, in any case in which such deceased individual dies before attaining age 62 and section 415(a)(1) of this title (as in effect after December 1978) is applicable in determining such individual’s primary insurance amount— (I) such primary insurance amount shall be determined under the formula set forth in section 415(a)(1)(B)(i) and (ii) of this title which is applicable to individuals who initially become eligible for old-age insurance benefits in the second year after the year specified in clause (ii), (II) the year specified in clause (ii) shall be substituted for the second calendar year specified in section 415(b)(3)(A)(ii)(I) of this title , and (III) such primary insurance amount shall be increased under section 415(i) of this title as if it were the primary insurance amount referred to in section 415(i)(2)(A)(ii)(II) of this title , except that it shall be increased only for years beginning after the first year after the year specified in clause (ii). (ii) The year specified in this clause is the earlier of— (I) the year in which the deceased individual attained age 60, or would have attained age 60 had he lived to that age, or (II) the second year preceding the year in which the widow or surviving divorced wife first meets the requirements of paragraph (1)(B) or the second year preceding the year in which the deceased individual died, whichever is later. (iii) This subparagraph shall apply with respect to any benefit under this subsection only to the extent its application does not result in a primary insurance amount for purposes of this subsection which is less than the primary insurance amount otherwise determined for such deceased individual under section 415 of this title .
(C) If such deceased individual was (or upon application would have been) entitled to an old-age insurance benefit which was increased (or subject to being increased) on account of delayed retirement under the provisions of subsection (w), then, for purposes of this subsection, such individual’s primary insurance amount, if less than the old-age insurance benefit (increased, where applicable, under paragraph (5) or (6) of section 415(f) of this title and under section 415(i) of this title as if such individual were still alive in the case of an individual who has died) which he was receiving (or would upon application have received) for the month prior to the month in which he died, shall be deemed to be equal to such old-age insurance benefit, and (notwithstanding the provisions of paragraph (3) of such subsection (w)) the number of increment months shall include any month in the months of the calendar year in which he died, prior to the month in which he died, which satisfy the conditions in paragraph (2) of such subsection (w).
(D) If the deceased individual (on the basis of whose wages and self-employment income a widow or surviving divorced wife is entitled to widow’s insurance benefits under this subsection) was, at any time, entitled to an old-age insurance benefit which was reduced by reason of the application of subsection (q), the widow’s insurance benefit of such widow or surviving divorced wife for any month shall, if the amount of the widow’s insurance benefit of such widow or surviving divorced wife (as determined under subparagraph (A) and after application of subsection (q)) is greater than— (i) the amount of the old-age insurance benefit to which such deceased individual would have been entitled (after application of subsection (q)) for such month if such individual were still living and paragraph (5) or (6) of section 415(f) of this title were applied, where applicable, and (ii) 82½ percent of the primary insurance amount (as determined without regard to subparagraph (C)) of such deceased individual, be reduced to the amount referred to in clause (i), or (if greater) the amount referred to in clause (ii).