Constitutional FAQ Answer #19
Q19. "In Article 2, Section one, it states that someone can be president if they 'have been a 14 years resident within the United States.' Also, in Article 1, Sections 2 and 3, it states the years of residency necessary to be a Senator and within the House of Representatives. Are all of these years (14 years, 7 years, and 9 years) consecutive, or are the years totaled together, if one has been in and out of U.S. residency throughout his or her life? Does this include time spent out of the country before the electee reached age 18?"
A. Actually, a Representative need have been a citizen for seven years, and a Senator a citizen for nine. It does not mention time of residency for either, only that you be a resident of the state you're running in.
For President, you need to either be a natural-born citizen of the U.S., or a non-natural citizen as of the passage of the Constitution (those people are all dead now). You can read more on the intricacies of what exactly "natural-born" means on the Citizenship Topic Page. The one other qualification is, as you note, the need to have been a resident for 14 years. This was designed to ensure that a person running for President have some sort of physical tie to the country. It was not enough to have been born here and then left, gained popularity overseas, and return for a triumphant election to the Presidency.
But even this seemingly simple requirement is subject to two possible interpretations. The first is that residency must be consecutive, meaning that before assuming the office of president, a person must have lived within the United States for fourteen straight years. The second is that the fourteen years can have been arrived at cumulatively. There are problems with both interpretations.
As to the latter interpretation, if a child of 14 years leaves the U.S. and returns at the age of 50, the person would be eligible to be president, because the 14 years were accumulated at the beginning of the child's life. Was this the Framers' intent?
As to the former interpretation, the requirement could disqualify many people, including those doing diplomatic or military service, or those doing business outside the country. Though the law can make exceptions for national service, it seems unlikely that the Framers would have wanted to disqualify a business person who lived overseas for a short time a dozen years ago.
Fortunately, we have precedent to help resolve the question. Herbert Hoover was elected to the presidency in 1928 and inaugurated in 1929. If the "consecutive" interpretation were correct, Hoover would have had to live in the United States since March, 1915. Hoover, however, lived in London, England, during that time frame. The Court Directory of London listed a London address for Hoover from 1910 to 1917. If, therefore, the "consecutive" interpretation is not the correct one (or, at least, is disproven by precedent), only the "cumulative" interpretation remains.