The presidential line of succession is a list of people who are legally able to take over the position of President of the United States in the event that the president is incapacitated, killed, impeached and has to leave office, or otherwise unable to perform. The designation of a formal succession plan is designed to protect the integrity of the office of the president by ensuring that the United States will always have a leader, even in a crisis. In order for the presidential line of succession to be exhausted, 18 people would have to be disqualified, incapacitated, or killed, which would be extremely unlikely.
Most nations have some form of a line of succession, and the groundwork in the US was laid in the Constitution. The first formal law regarding the matter was passed in 1792, and another was passed in 1886. In 1947, following the death of President Roosevelt, another Presidential Succession Act was passed, and this Act governs the current succession line.
If the President dies, the Vice President is first in line for the office. After the Vice President come the Speaker of the House of Representatives and the President Pro Tempore of the Senate, respectively. Should all three of these individuals be disqualified or incapacitated, the presidential line of succession turns to the Presidential Cabinet, starting with the Secretary of State and working its way through the Secretary of the Treasury, Secretary of Defense, Attorney General, Secretary of the Interior, Secretary of Agriculture, Secretary of Commerce, Secretary of Labor, Secretary of Health and Human Services, Secretary of Housing and Urban Development, Secretary of Transportation, Secretary of Energy, Secretary of Education, Secretary of Veterans Affairs, and finally the Secretary of Homeland Security.
There are several caveats involved in the presidential line of succession. The first is that acting officials cannot be considered in line for succession. For example, if the Secretary of Defense steps down and an acting official is appointed to fill this position, that official is not part of the line. Likewise, non-natural citizens are excluded. The Speaker of the House and President Pro Tempore rank high on the list thanks to the 1947 Act of Presidential Succession, which was championed out of concern that the president could potentially appoint his or her successor if the Cabinet members are ranked first. The Speaker of the House and President Pro Tempore are elected officials, giving citizens a role in their selection, and Congress has the power to recall Cabinet members if it sees fit.
To prevent a catastrophic situation in which every person in the presidential line of succession could be incapacitated, such as a terrorist attack, the officials who could succeed to the position are never allowed to be in the same place at the same time. Even at events when all would normally be present, at least one person is taken offsite to a secure location. By convention, members of the line usually do not travel together or stay in the same locations, even if they are attending the same events.