Historians (and sometimes political scientists) are surveyed and asked to give presidents of the United States number ratings on their overall performance or on different aspects of their leadership.

Several different factors are considered in deciding what makes one a good or bad president.  These include their character, their vision for the country, their relations with congress, their relations with foreign leaders (diplomacy), how they managed the economy, how they managed the military, and their overall political skill.

To make sure the rankings are fair, many surveys equally balance the opinions of Democrats and Republicans.

It is sometimes difficult to accurately rank a president because all of the presidents faced completely different challenges.

Historical opinions of U.S. presidents may change over time. For example, Harry Truman had very low approval ratings right after he left office, but many historians now consider him among the greatest presidents.

General findings

Highly ranked

The following presidents are usually ranked highly:
George Washington (the first president of the United States and helped the United States win the American Revolutionary War)
John Adams (oversaw the Quasi-War)
Thomas Jefferson (partly because of the Louisiana Purchase and for being the author of the Declaration of Independence)
James Madison (led the United States through the War of 1812)
James Monroe (expanded the United States and supported the founding of colonies in Africa for free African Americans)
James K. Polk (President during the Mexican American War)
Abraham Lincoln (led the United States through the American Civil War and helped end slavery)
Theodore Roosevelt (strengthened the United States Navy and had the Panama Canal built)
Woodrow Wilson (President during World War I, supporting women's rights, and created the Federal Reserve)
Franklin Roosevelt (led the country through the Great Depression by restoring the economy and President during World War II)
Harry Truman (President during the end of World War II, the beginning of the Cold War and the integration of the Armed Forces)
Dwight Eisenhower (President during the Cold War, created NASA, and expanded the United States highway system)
John F. Kennedy (led the United States through the Cuban Missile Crisis and Cold War)
Ronald Reagan (helped restore the American economy by lowering inflation and creating jobs, created better relations with Soviet Russia, helped end the creation of new nuclear weapons, and led the United States through the end of the Cold War)
Barack Obama (improved the economy big time and made healthcare cheap known as Obamacare)

Mixed ratings

Some presidents have mixed ratings.  For example, Ulysses S. Grant is thought to be a bad leader since he had corrupt friends for government jobs, but at the same time he helped African-American to have more rights in the Reconstruction Era. 

Recent examples:
 Lyndon B. Johnson, who passed civil rights bills and President during the Great Society, but also escalated the Vietnam War
 Jimmy Carter, who helped pardon Vietnam War draft evaders, created the Education and Energy departments and negotiated a peace treaty between Egypt and Israel, but weakened the American economy through high unemployment and high inflation and oversaw the Iran hostage crisis, an oil crisis and the failed Operation Eagle Claw.
 George H. W. Bush, who successfully led the United States through the Persian Gulf War and for formally ending the Cold War, but the American economy got a bit worse during his presidency.
 Bill Clinton, praised for improving the economy but was caught in the Lewinsky scandal which he was impeached for.

Low in rankings

Zachary Taylor, Millard Fillmore, Chester Arthur, William Howard Taft, Benjamin Harrison, Calvin Coolidge, Herbert Hoover, Rutherford B. Hayes, Martin Van Buren, Richard Nixon, and George W. Bush are considered to be below average.

John Tyler, Franklin Pierce, and James Buchanan are often considered to be among the worst because they refused to prevent the growth of the slavery which resulted in the Civil War.  

Andrew Johnson is often ranked among the worst because he was against Lincoln's Reconstruction.

Warren G. Harding is often considered to be the worst because he hired corrupt friends to become government officials.

Not ranked
William Henry Harrison is often not ranked because he died shortly after becoming president. Same goes for James Garfield. Also, Joe Biden is not yet ranked in polls because his presidency not ended yet.

Other websites
 C-SPAN 
 Opinion Journal
 Times of London

History of the United States