The above data is taken from Wikipedia's List of Presidents of the United States by net worth. I believe most of the data comes from a 24/7 Wall St article from 2010.

The above article has some details for each president, including how they made most of their money. Most inherited their money, but not all. Some of this wealth is actually the wealth of the president after leaving office. Many modern day presidents such as Bill Clinton, Barack Obama and Gerald Ford only made their millions after leaving office (from book deals).

Republican presidents have a total of $3,847 million dollars net worth while Democratic presidents have a total of $1,467 million dollars net worth (in 2016 dollars).