This is a list of United States Secretaries of Defense by time in office. This is based on the difference between dates; if counted by number of calendar days all the figures would be one greater. (Note that the list of popes by length of reign uses numbers of calendar days.)
Robert McNamara and Donald Rumsfeld are the only two people to have served as Secretary of Defense for more than 7 years. Rumsfeld is the only Secretary of Defense to have served two non-consecutive terms. Elliot Richardson served as Secretary of Defense for less than four months before becoming Attorney General.