Former President Barack Obama and wife Michelle entered the White House in 2008 with a net worth of $1.3 million, but in the 10 years since that time, that has grown to an estimated $40 million, and could earn as much as $242.5 million in the years ahead.

Obama made $20 million from the time he joined the U.S. Senate in 2005 through the end of his presidency, including money from his government salary, book royalties, investment income, and from Michelle Obama's income from the University of Chicago before she became first lady, reports Business Insider.

Obama earned $400,000 a year during his eight years as president, and he earns an annual pension of about $200,000 as a former president.

Most of their money, though, came from books. Obama brought in $15.6 million in advances and royalties from his books "The Audacity of Hope" and "Of Thee I Sing: A Letter to My Daughters" and royalties for "Dreams From My Father," according to Forbes.

Last year, he and his wife signed book deals worth at least $60 million and recently signed a production deal with Netflix, although the financial details of that haven't been released.

Since leaving office, the former president has also been paid as much as $400,000 for public speaking events.

The Obamas do spend some of their money on vacations, but they've also made investments for their daughters' future and in real estate.

In 2007, before entering the White House, the couple bought Bright Directions age-based growth plans, each worth $50,000 to $100,000, to pay for their daughters' college educations. Malia Obama started at Harvard University last fall, while Sasha remains in high school.

After leaving the White House, the Obamas bought a mansion in Washington, D.C., for $8.1 million, after having rented it. They also still own their home in Chicago's Hyde Park neighborhood. They paid $1.65 million for the home in 2005 but now it's valued at $2.5 million.

They have, however, spent some of the fortune on vacations, including visiting the president's home state of Hawaii and the island of Tetiaroa in French Polynesia, where they stayed at the luxury resort, The Brando. A night in a one-room villa at the resort can cost between $3,034 and $4,318.

The General Services Administration provides former presidents with money to cover travel and business expenses, so all the vacation money may not have come from their own accounts.

They also spend a great deal on philanthropy, according to Forbes. In the years from 2009 to 2015, they donated $1.1 million to charity, focusing on African-American causes, disaster relief and veterans. More than half the donations were to children's organizations.

Obama's biggest donation to date was his $1.4 million Nobel Peace Prize award in 2009, which he divided among multiple charities.