This is my back-of-the-envelope speculation:
Suppose you go to UC Berkeley for CS. A nice, round, accurate number for that is ~$52,000/year. Suppose you work during for two of those years (I did, not everyone can), and your overall obligations are $208,000 for four years, less your wages -- say a meager $18,000/year. Also, you would have had to pay rent whether you went to school or not, so that is not truly a cost of the education. Let's say your rent is a $900/mo, so ~$11,000/year. Plus books and supplies, which may be as high as $2,000/year.
So we have roughly $140,000 for four years of education at a top notch program.
The other part of the equation requires more voodoo. I don't know off-hand what the numbers are for educated v. unschooled programmers. My anecdotal evidence for Cal alums is that entry-level offers are mostly in the $80-90,000 range, with a few as high as $100,000. Within five years, everyone I know of is solidly within the $120-$150,000 range of pay. Unless they've gone the startup route, in which case they are electing for minimal pay.
Personally, my expectation would be, having done hiring in the past and now, that there would be very few unschooled devs who could break $120,000. If you are very conservative in your estimate then, let's say the unschooled and the educated dev are separated by $10-$20,000 until year four -- so little advantage for the first four years. After year five, the educated dev pulls ahead, and by year ten is earning $160,000 whereas the unschooled dev has maxed out and is receiving only $120,000 plus COLA pay increases. So conservatively, by year ten, the gap in pay has already covered or will soon cover the cost of the education.
This also does not reflect the fact that because getting into the front door is not even possible in many places unless you have a degree, you cannot access any of the opportunities for startup equity. In my opinion, the gains in opportunity are far and away the more valuable win with a degree.
And yet, my favorite programmer, John Carmack, only attended university for two semesters.