President Donald Trump is historically unpopular heading in the 2018 midterm elections, with an approval rating of 40%.

Based on data from Gallup, no other president in modern US history had such a low approval rating heading into their first midterm election.

Trump will not be on the ballot on Election Day, which comes on Tuesday, November 6, but midterms often serve as a referendum on the president and his party.

President Donald Trump is historically unpopular heading in the 2018 midterm elections, according to data from Gallup.

The most recent polling from Gallup shows that just 40% of Americans approve of the job Trump is doing as president. Based on historical data from Gallup, no other president in modern US history had such a low approval rating heading into their first midterm election. The next president to come close was Ronald Reagan, who had a 43% approval rating at this point in his presidency.

Former President Barack Obama, whom Trump frequently criticizes and compares himself to, had a 46% approval rating heading into his first midterm elections.

Trump has a historically low approval rating heading into the 2018 midterm elections. Skye Gould/Business Insider

Trump will not be on the ballot on Election Day on Tuesday, November 6, but midterms often serve as a referendum on the president and their party.

The president alluded to this on Monday, telling reporters, "Even though I'm not on a ballot, in a certain way I am on the ballot."

Read more: Some states, including California, allow you to register to vote on Election Day — here they all are

Republicans currently control both the House of Representatives and the Senate.

If Democrats are able to flip either, it will have major implications for Trump's agenda over the next two years. With the country bitterly divided over an array of political issues, some have labeled this one of the most consequential elections of the era.

While urging people to get out and vote at a rally on Sunday, Obama said: "Hope is still out there. We just have to stand up and speak for it. And in two days ... you get to vote in what might be the most important election of my lifetime, maybe more important than 2008."