The presidential race may be sucking up all of the oxygen, but there's a photo finish shaping up for control of Congress.

Republicans are trying to defend a narrow majority in the Senate. Democrats look certain to pick up several seats — whether they’ll do well enough to regain the majority could come down to a few close races.

Meanwhile, the House of Representatives looks likely to stay in Republican hands. Barring some big and unforeseen political shock, the GOP’s hold on the lower chamber appears likely to extend into 2017.

Here’s a look at how the math shakes out.

Republicans hold the Senate with a four-seat majority — and Democrats are in more close races than that

The current breakdown of the Senate looks like this: Democrats control 46 of the Senate’s 100 seats, and Republicans control the other 54. Assuming they win the White House (and thus the tiebreaker vote), Democrats will need to gain four seats this November to control the upper chamber.

The big thing working in their favor is that Republicans have much more territory to defend this year than the Democrats do. There are 34 Senate seats up for election this year — of those, 24 are currently controlled by Republicans. Only 10 are in seats controlled by Democrats.

Democrats are expected to coast to reelection in nine of the 10 seats they already hold. Meanwhile, Republicans only look safe in 14 of the 24 seats they control. So it’s looking like there will be 11 competitive Senate races on Election Day — one Democrat-held seat that doesn’t look safe (Nevada), plus an additional 10 Republican seats that the GOP could let slip.

Of these 11 races, polling suggests Democrats are very much on track to win at least three currently in GOP hands: Wisconsin, Illinois, and Pennsylvania. They’re not guarantees, but Democrats have held leads in all of these races throughout the campaign.

The good news for Senate Republicans is that their candidate in Nevada, Joe Heck, is currently leading in the race to replace retiring Democratic Senate Minority Leader Harry Reid. If Heck takes back Reid’s seat, Democrats will need to flip five — not four — Republican-held seats to win back the Senate.

But even if Heck wins, Democrats will have several opportunities to win five GOP seats. One of their best bets right now is probably in Indiana, where former Sen. Evan Bayh has a narrow lead. There is also a slew of races where Democrats are very likely to have a chance of winning that fifth seat. Republicans are either clinging to narrow leads or essentially tied in New Hampshire, North Carolina, and Missouri.

The GOP would have to win all but one of those races, plus Indiana, where they currently trail, plus Reid’s seat in Nevada to keep the Senate. That’s not impossible — but it’s looking increasingly unlikely.

Democrats would need 30 seats to win the House — and they’re unlikely to win that many

Right now, Republicans have a big majority in the House of Representatives, holding 246 seats to the Democrats’ 186.

Two House seats that are currently vacant are expected to break into the Democratic column. So from a starting place of 188 seats, Democrats need to win 30 GOP-held seats to get to 218, or a majority of the House.

It seems basically impossible at this point. Ballotpedia’s tracking of House races projects Democrats should win 184 seats, while Republicans can probably count on 228 seats to be reliably in their corner.

That leaves just 23 seats in the competitive category. Many of those will most likely be won by Republicans, of course — they include several conservative-leaning districts that have gone red in recent years.

But even if we imagined that Democrats somehow ran the table and won all 23, they’d still be seven House seats shy of the majority. The overall balance of power in the House would shift, but control of the lower chamber wouldn’t actually shift.

Both polling and history suggest that the Democrats’ 30-seat swing is off the table. In fact, Lyndon Johnson’s landslide reelection in 1964 is the only time since World War II that the incumbent president’s party gained as many House seats as Democrats need to secure a majority in 2016.

A few weeks ago, there was a lot of speculation that Donald Trump’s polling collapse could so depress Republican voter turnout that it might put the once unthinkable back in the realm of possibility.

Even then, though, the odds seemed too long.

"Since Trump's sexual assault tape scandal, there seems to have been a relatively small yet real shift toward Democrats in several House races, enough that we might expect a handful more seats to flip than 3 weeks ago, but still not close enough to the 30 that Democrats need to gain to win the House," wrote Stephen Wolf, who tracks congressional math for the Daily Kos, in an email last week.

But in the final days of the presidential race, polling has tightened. And that is probably erasing any pipe dreams of turning the House blue.