With a tight presidential race, the topic of recounts has surfaced in Georgia, Wisconsin, and other states. And Pennsylvania Sen. Pat Toomey announced on CNN Thursday that he expects a recount in Pennsylvania, no matter who’s ahead. But what would that mean and how does it work?

Recounts are carried out when there’s a close margin of victory between candidates, or when requested, but the laws vary by state. In Arizona, Connecticut, Florida, Hawaii, Mississippi, South Carolina, and Tennessee, a recount process isn’t allowed at all.

Here’s how recounts work in the Keystone state.

How does the recount process work in Pennsylvania?

Under Pennsylvania state law, an automatic recount is triggered if one candidate wins by a half of a percentage point or less. The secretary of state must order the recount no later than the third Wednesday following the election, and election officials must carry out the recount.

In Pennsylvania, voters can also request a recount. There is no specific vote margin required. To request a recount, three voters of an election district must submit a signed petition to the county board that alleges errors in the vote totals. Petitioners don’t need to specify how an error happened to provide evidence of their allegations. All requests must be made within five days of the election. If the request is appealed, voters can petition the Court of Common Pleas.

“I believe a recount is likely. The margins right now are very narrow, but also since Pennsylvania doesn’t require actual evidence of voter fraud, it allows for a lot of room in this process,” said Nyron Crawford, an assistant professor in political science at Temple University. “The president’s comments are a setup for a recount request — allegations for fraud have been set in motion.”

Biden (D)
Trump (R)
0% of expected votes counted so far
0.0% of expected Pa. votes counted
Last updated just now

Unlike in many other states, candidates can’t request a recount. They generally find voters to request a recount on their behalf, said Crawford, and once the recount process begins, they can show up to oversee it.

A mandatory recount must be completed within three weeks after the election. There is no official deadline for a requested recount to be completed.

» READ MORE: Can Pennsylvania split up its 20 electoral votes?

Who pays for a recount?

Automatic recounts are paid for by the state, and they can be quite expensive.

“The massive cost is that you have to have attorneys in every county. There’s also the organizational effort of every county, and you’re paying overtime for all the workers,” said Clifford Levine, an election lawyer and partner at Pittsburgh-based Dentons, Cohen and Grigsby. “It can cost hundreds of thousands of dollars.”

When a recount is requested by a petitioner, they have to put down a $50 cash deposit or a $100 bond deposit per district. If the recount reverses the result of the election, the petitioner gets a refund. If the petitioners appeal to the Court of Common Pleas, the court may also require the petitioner to pay all legal costs of the hearing.

How likely is it that a recount will flip the results?

Few recounts have led to a change in who wins an election. In the 5,778 statewide elections over the last 20 years, there have been 31 completed statewide recounts, according to a report by nonpartisan organization FairVote. Only three of those 31 recounts overturned the outcome of the race, and in all three, the original margin of victory was less than 0.05%, the report says.

In terms of presidential elections, there have only been two statewide recounts over the last 20 years, one in Florida in 2000 and one in Wisconsin in 2016. The original winner remained the winner after both recounts. The Florida recount shifted the margin by 1,247 votes and the Wisconsin recount shifted the margin by 571 votes, FairVote reports.

“A recount only changes a very, very small percent of the vote, so you have to have a really tight race to even make it worth it,” said Marni Jo Snyder, a Philadelphia-based attorney who specializes in election law.