Theodore Roosevelt was 42 years old when he became president in 1901. He was sworn in after President McKinley was assassinated, making Roosevelt the youngest president in U.S. history at the time.