14 of the 58 elections in US history were close enough that at least one state could have unilaterally changed the winner of the election.
3rd election: Adams-Jefferson (any of NH, VT, MA, RI, CT, NY, NJ, DE, or MD)
4th election: Jefferson-Adams (any of NY, PA, MD, VA, NC, or SC)
7th election: Madison-Clinton (either PA or VA)
15th election: Polk-Clay (NY)
16th election: Taylor-Cass (either NY or PA)
23rd election: Hayes-Tilden (any of ME, NH, VT, MA, RI, PA, SC, FL, OH, MI, IL, WI, MN, IA, LA, KS, NE, CO, NV, CA, or OR) (winner lost the popular vote)
24th election: Garfield-Hancock (NY)
25th election: Cleveland-Blaine (NY)
26th election: Harrison-Cleveland (NY) (winner lost the popular vote)
33rd election: Wilson-Hughes (any of VA, NC, GA, AL, TN, KY, OH, MO, TX, or CA)
48th election: Carter-Ford (NY)
54th election: Bush-Gore (any of WV, VA, NC, SC, GA, FL, AL, MS, TN, KY, OH, IN, MO, AR, LA, TX, OK, KS, CO, AZ, UT, ID, or NV) (winner lost the popular vote)
55th election: Bush-Kerry (any of FL, OH, or TX)
58th election: Trump-Clinton (TX) (winner lost the popular vote)
What is interesting is that according to rankings of American presidents by scholars, most of America’s worst presidents were elected by landslides: the eight presidents with the lowest average ranking in polls of scholars consist of three that were presidents by succession and five for which elections they won do not make this list. Expand to the twelve worst and include George W. Bush and Zachary Taylor, whose elections do make this list, but also include Richard Nixon, who won the second-greatest landslide in US presidential election history.
There also exist ranked-excellently presidents that won their elections by landslides. Franklin D. Roosevelt, who won all four of his as such, and Abraham Lincoln, although his second election is a special case due to no Confederate states being in the election.