The Numbers
Cost of the war is estimated at over $6 billion for the North, over $2 billion for the South, plus another $3 billion paid out in pensions over the next 50ish years.
Estimated "value" of all southern slaves: $4 billion (roughly 4 million slaves with an estimated price of $1,000 per slave).
Okay, that's out of the way, so here's the real answer:
It didn't matter.
It didn't matter.
It.
Did.
Not.
Matter.
(Not being blunt to rag on OP, but because this needs to be made absolutely clear).
As a general population, antebellum southern slaveowners were never--ever-- the slightest bit interested in gradual and/or compensated emancipation as government policy. Every time the idea was proposed, it was staunchly, unquestionably rejected. It was hypothetically necessary, they argued, to remove freed black Americans from the nation, so as to prevent a race war, yet they still rejected government proposals to do so because that might encourage more slaves to be freed (thus eroding slavery). Attempts to compensate, they likewise argued, interfered with property rights.
Emancipation schemes were attempted throughout the antebellum period, which either tried to expel freed slaves out of the country (to Africa or the Caribbean) and/or compensate slaveholders, but never with any shred of success.
One good example: in Jan. 1860, the only antislavery Congressman in the South, Frank Blair Jr. (Republican) from St. Louis, proposed that the U.S. should conquer tropical areas that would then be made available to slaveholders, but only if they signed an emancipation pact that would send their slaves to the islands and promise them freedom and property after a specified time. The concept was to give slaveholders a fancy pay day (tropical climates made for profitable agriculture) while also getting rid of those pesky black people (/s) that slaveholders insisted could only be controlled in slavery. This plan, like others to reduce or mitigate slavery in parts of the South, never gained significant traction.
I don't think any case can demonstrate this point more clearly than Kentucky, a slave state which did not secede from the Union. Lincoln attempted several times to get Kentucky to agree to some scheme of compensated emancipation. One of these schemes stated that if Kentucky would agree to abolish slavery by January 1st, 1882 (as in, 20 years later), he would recommend that Congress pay owners $400 per slave. This may not look good alongside that $1000 number I have above, but remember that this was 2 years into the war, and Lincoln had already announced the coming Emancipation Proclamation. Kentucky, being a loyal slave state, would not be subject to the EP, but it was clear by then that the exigencies of war was eroding slavery as everyone knew it. Lincoln was warning the slaveholders that they could get something for their slaves, or likely nothing. Their response, "Kentucky does not desire to sell her slaves to the government of the United States at any price." By March 1865, around 71% of Kentucky's slaves had been freed through one means or another, and the rest followed in December 1865 with the 13th amendment.
Slavery was definitely a capitalist enterprise, but it was also a political, racial, masculine, and social power structure that permeated every strata of southern life. At the end of the day, it wasn't just about the money.
Sources