Hardly a day goes by without a member of the media or policy world pronouncing that America's education system is in dire straits.

There are constant laments over how poorly the U.S. fares by international standards, its failure to produce literate students and its unsightly levels of racial segregation. There's a massive debate over how to overcome these problems, but there's no doubt that at least one factor would help: more money.

But where would the money come from? America's broken and bloated prison system might be a good start.

Keeping someone alive in prison is expensive — much more so than educating them. The GIF below uses data from the Vera Institute of Justice's 2012 "Price of Prisons" report and 2012 U.S. Census data on public school costs. (Several states did not complete the survey, and thus are missing from this chart.) You can see that average resources devoted to prisoners annually easily outpace resources for students:

Datawrapper

Housing a prisoner costs roughly five times as much as educating a student in California, Washington and Utah. In dozens of other states, the cost of imprisoning someone is far more than double or triple the cost of educating a student.

Mass incarceration is costly — and it doesn't work: Comparing the housing of prisoners to the education of students might seem like comparing apples and oranges. After all, a student is spending about a third of a day at school, while a prisoner is being kept alive 24/7.

In light of that fact, there are two points worth noting:

First, the U.S. should simply not be spending any money on incarcerating many of the millions in prison all over the country. Since the 1970s, the U.S. has built a system of mass incarceration that is unrivaled the world over: About 25% of the world's prisoners are incarcerated in America, even though it hosts only 5% of the world's population. Brutal sentencing practices — lengthy minimum sentences, harsh penalties for minor drug possession, three strikes laws — have filled up our prisons at rates that outpace Russia and China. In other words, every state is spending huge sums of money on people who should either not be incarcerated in the first place or should at least be serving far shorter sentences.

Second, the U.S. incarceration system is basically an inversion of its education system. As flawed as the public school system is in this country, children routinely emerge with knowledge and skills that allow them to contribute more effectively to society. By contrast, the voracious prison system systematically fails to rehabilitate its inmates. Nearly two-thirds of the inmates released every year return to prison. Those that manage to remain outside of it are often far worse off than before they were incarcerated, as they endure discrimination in housing, employment and political participation.

Perhaps if more money were spent on creating and sustaining an education system that met all of its students' needs, we wouldn't need to spend so much money on putting people behind bars.

This article has been updated.