Most states prohibit people from voting while in prison for a felony. Even if someone isn't physically incarcerated, if they're serving a criminal sentence for a felony conviction, they're probably not allowed to vote. Twelve states make it illegal for some people with felony convictions to vote even after they've finished their sentences.

As a result, according to the Sentencing Project, 5.8 million American citizens have lost their voting rights through the criminal-justice system. And one in every thirteen African-American citizens has lost his or her right to vote this way.

This map, compiled by the Sentencing Project based on 2012 data, shows which states have disenfranchised the biggest shares of their electorates:

The map shows that just disenfranchising people who are currently serving sentences for felonies doesn't have nearly as much of an effect on the electorate as disenfranchising people after they've finished their sentences. All but two states — Maine and Vermont — make it illegal for people to vote from prison if they've been convicted of felonies. Thirty-five states prohibit people from voting if they're on parole after being released from prison, and 31 make it illegal for people to vote who are on probation for a crime (even though they may not have gone to prison at all).

In a couple of states in the Deep South (Georgia and Louisiana), so many people are serving felony sentences that over 3 percent of the electorate is disenfranchised. But even states with the biggest prison populations — like California — don't end up disenfranchising much of their electorate this way. (California bans both prisoners and people on parole from voting, but only disenfranchises 1 percent of its electorate.)

What really makes a difference is whether a state bans someone from voting after he's completed a felony sentence. Twelve states disenfranchise people with felonies on their records after they've served their time. In some of those states, the ban only lasts for a few years, or a citizen can apply to have his voting ban lifted. But as of 2012, four states — Florida, Iowa, Kentucky, and Virginia — had a lifetime ban on voting for anyone who'd ever been convicted of a felony.

Of course, because African Americans — and particularly black men — are disproportionately represented in the criminal justice system, felon disenfranchisement ends up shrinking the African-American electorate. Here's the same map, but focusing on percentage of the African-American electorate that's disenfranchised thanks to the criminal justice system (again, based on 2012 data):

This is where the bans on voting even after someone's completed his sentence really make an impact. In Florida, Kentucky, and Virginia — three of the four states whose laws banned anyone with a felony conviction from voting ever again — over 20 percent of all black citizens are legally prohibited from voting because of their involvement with the criminal-justice system.

The impact of disenfranchisement on the black electorate is pretty clear even in states that only prohibit people from voting while they're still serving their sentences. There are eleven states that disenfranchise 5 percent or more of their adult black citizens just through banning voting until a felony sentence is completed. (None of those states disenfranchise 5 percent of their citizens as a whole.)

At the end of the day, one in every thirteen black citizens can't vote because they're either serving a felony sentence, or live in a state where they're deprived of voting rights even after that sentence is done. By contrast, felony disenfranchisement only affects one in every fifty-six white citizens.

Policymakers are paying increasing attention to trying to fix the racially disparate impacts of the criminal justice system. But changing the racial balance of who goes into and gets out of prison in the future doesn't help people who have already been disenfranchised. That's why many groups and policymakers in both parties see voting restoration as an important part of criminal justice reform.

In Virginia, for example, Republican Governor Bob McDonnell instituted a policy that automatically restores the voting rights of some citizens; his Democratic successor, Terry McAuliffe, has continued the program. Between the two of them, they've restored the voting rights of 10,000 citizens who'd been convicted of nonviolent felonies. That's just a drop in the bucket — Virginia's laws have disenfranchised more than 450,000 citizens, according to the Sentencing Project — but it's a sign that criminal-justice reformers understand the importance of undoing voting restrictions.

CORRECTION: The headline of this article originally misstated the number of disenfranchised citizens. It is 5.8 million, not 8.5 million.