Notwithstanding subsection (a), the President may defer the retirement of an officer serving in a position that carries a grade above captain for such period as the President considers advisable, but such a deferment may not extend beyond the first day of the month following the month in which the officer becomes 64 years of age.
33 U.S. Code § 3043 - Mandatory retirement for age
(a) Officers below grade of rear admiral (lower half)
(b) Flag officers
The following state regulations pages link to this page.