Washington CNN  — 

To become speaker of the US House of Representatives, a candidate traditionally needs 218 votes on the chamber floor because that equates a majority of the 435-member chamber.

But it’s still possible for a candidate to win without getting there. And it’s happened before.

Why does this matter?

The top contenders for speaker among Democrats (Nancy Pelosi) and Republicans (Kevin McCarthy) are no guarantee for the job due to some dissension within their respective ranks.

So, for example, if Democrats win the House by a five-vote margin, 220-215, then Pelosi could only afford to have two Democrats vote against her (which entails voting for another person) and still become speaker with 218 votes. If she loses three or more, she won’t get a majority of the House, assuming all members are present.

That’s why the bigger the margin, the better for Pelosi or McCarthy, depending on who wins the House. Dozens of Democratic candidates have already pledged to vote against Pelosi, while McCarthy could face some headwinds among House Freedom Caucus members. So if either party can get a healthy margin, the two leaders can afford to lose more members of their own party.

However, there’s another scenario that could be helpful to either leader — and that involves voting “present.”

Let’s say Democrats still have that 220-215 margin, for example. If three Democratic members vote “present” – instead of voting for someone else – it doesn’t count as three votes that hurt Pelosi. Rather, it changes the pool of votes from 435 to 432, thus lowering the majority threshold from 218 to 216.

This happened in 2015, when John Boehner won with only 216 votes, and with Newt Gingrich, who won in 1997 with only 216 votes.

Does that mean all of those anti-Pelosi candidates can just vote “present” and she would still become speaker?

No. It’s a bit of a gamble, because if too many Democrats vote “present” it would ultimately tip the scales for Republicans math-wise.

For example, if Democrats have a five-seat margin, but six Democrats vote “present,” that puts the new pool at 214 Democrats - 215 Republicans. And if all 215 Republicans in that case vote for the same person, they could effectively choose the speaker because they would equate a majority.

This is why a contingency of members wanting to take Pelosi down will likely urge anti-Pelosi candidates to say a different name on the House floor, rather than vote “present,” because that hurts her more, according to one Democratic aide who’s aligned with Pelosi critics.

Still, the idea that one party would let their majority slip in the speaker election, thus give the other party the advantage, is highly unlikely.

OK, but what if there is a tie?

If five Democrats vote “present” in a 220 majority, that puts the numbers at 215 Democrats – 215 Republicans. This would automatically trigger another round of voting.

The longest speaker election in history took place in 1856, lasting two months and 133 ballots, with Rep. Nathaniel Banks of Massachusetts ultimately chosen.