There is a statistic floating around: According to some new polls, President Trump is now more popular ahead of the midterm elections than President Barack Obama was.

It’s an interesting stat in that it challenges the conventional wisdom about Trump’s depressed base of support. It’s also notable that polls in recent days have him trending upward. NBC News/Wall Street Journal and Fox News polls even showed 47 percent of registered voters approving of the president; that’s the highest of any high-quality, non-Rasmussen and non-Ipsos poll since February. Trump’s polling average on RealClearPolitics has risen from below 41 percent earlier this month to 44.2 percent today. And his current stay above 43 percent in the polling average is the longest he has been there since the early months of his presidency. (He had similar spell in May and early June.) It’s a legitimate uptick.

All of that said, whether the apparent Trump bump actually has an effect on the upcoming elections is another matter entirely.

As The Post’s Sean Sullivan wrote this weekend, there is a growing sense that Democrats' expected takeover of the House isn’t looking as likely anymore — or at least that the “blue wave” won’t be as large as it appeared. Part of that owes to Trump’s improving fortunes, but part of it owes to an onslaught from well-heeled GOP outside groups and possibly to newfound GOP enthusiasm stemming from Brett M. Kavanaugh’s Supreme Court confirmation.

But if Republicans are taking electoral solace from Trump’s approval rating at least momentarily cresting Obama’s rating as the 2010 midterms loomed, they may want to look elsewhere.

Trump’s 44.2 percent RCP average is about tied with or better than seven of the last 17 presidents who faced midterm elections, according to Gallup polling at the time. That certainly speaks to the idea that his unpopularity isn’t at the historic levels it once was.

But each and every one of those presidents who were at 44 percent or below suffered substantial losses in those upcoming midterms — in the House, the Senate and often both. Obama is a great example. While his Gallup approval rating three weeks before the 2010 midterms was where Trump’s is today (44 percent), the Democrats that November lost 63 House seats and six Senate seats. When Obama’s approval was 42 percent shortly before the 2014 midterms, Democrats lost 13 House seats and nine in the Senate. Democrats lost both the House (in 2010) and the Senate (in 2014) when Obama was about as popular as Trump is today.

Here’s how this has looked over the past 68 years, sorted in descending order of presidential approval three weeks before the midterm:

Obama is the only president among those seven who has lost fewer than the 23 seats that today would flip the House. But that’s largely because the Republicans' House majority in 2014 was already near a historic high — meaning it was difficult to grow it further.

Which is instructive for 2018. It’s easy to look at these numbers and average them out to figure out what Democrats' electoral haul might be. But it’s highly dependent on the maps. It’s easier to win seats in the House when you’re in the minority and in the Senate when the right states are in-cycle.

Republicans have a 45-seat House majority, which means there are plenty of takeover opportunities for Democrats. At the same time, the Senate map heavily favors Republicans — to the point where Democrats will be hard-pressed to win the two seats they need to take it over, even with a very favorable environment. That means Trump and the GOP could very well fight to a stalemate in the Senate.

But if history is any indication — and it’s an imperfect indicator, as 2016 showed us — saving the House, even with Trump in the mid-40s, is going to be very difficult.