Looking at data from the TSHA, the cost of a skilled slave in 1850 was around $2,000.
Taking inflation into account, that's around $57,000 in 2016.
Even the average cost of a slave of any age, sex, or health condition was $800 by 1860 ($22K with inflation taken into account). That doesn't include housing, food, clothing, etc.
So how was owning a slave profitable? How was it not more economically viable to manumit slaves and pay them a criminally low wage? Especially for farming work, which is seasonal.
Prices in the last antebellum decade are at record highs, so they're not the best benchmark but the following holds regardless:
Enslaving people was profitable in the same way owning anything costly might be profitable. Sure the purchase cost is high, though that can be mitigated somewhat by buying women or children, but that's a one-time cost. For food, the enslaved will grow most of it themselves and be supplemented by meager rations that are often just barely adequate and might be deliberately less than what's required. For clothing, most enslavers don't provide much more than a long shirt for kids (both sexes) and then bottom-grade -literally made specifically with the expectation that only the enslaved would wear them- shirt and pants or dress once a year. In exchange for that one upfront cost, you get a whole life of labor for what amounts to considerably less than any likely wage.
Furthermore, while agricultural work is most demanding around planting and harvest there's still a good deal going on through the year and cotton's a pretty demanding crop in the era before mechanized agriculture. A lot of work goes into preparing the field, which can be as early as January, and then to tending it while it grows. But enslavers can and do rent out the people they enslave to others when they're not in immediate demand at their own slave labor camps. This is much more common with skilled labor, but ordinary field hands could be hired out as day labor for other whites. Wages are paid to the enslaver, of course. Some of them do let skilled enslaved people keep some or (very rarely) most of what they earn but that's down to individual whim and can change just as easily.
Enslaved labor offers the further benefit that it's unable to look for better opportunities. Even in very bad labor markets, there can be some competition to exert pressure on wages as least in potential. That's never going to be the case with people you don't have to pay and who do not have the option to entertain competing offers. This alone makes slavery better, from the enslaver's POV, than free labor. Whites in the antebellum South can, and often do, decide they're not doing well enough where they are and take their chances further west on land that their fellows have "emptied" by the usual genocidal means. This is enough of a problem that enslavers complain about skilled white labor walking off after only working a season or a few years.
That's all the economics and that alone is more than enough to preserve American slavery, probably in perpetuity, but there are considerable barriers to manumission beyond that. Enslavers spent the nineteenth century making manumission harder and harder because they view the presence of free blacks as a serious threat to the system and have a fundamental hatred and fear of black Americans not controlled by slavery. They're quite sure that if left to set the courses of their own lives, untortured and unterrorized, the enslaved will rise up in some kind of bloody race war or, conversely, make themselves public burdens and nuisances by refusing to support themselves at all. So from an enslaver's POV, slavery is basically necessary on a social level as well as an economic one.
But there's more. Most enslavers, most of the time, believe slavery is good in general. A slaveholding society is morally superior to one which uses free labor. By creating a permanent underclass of blacks, all whites are made equal (or equal enough) to defuse the class tensions they see rising in the free labor North. Enslaving people makes everything orderly and cordial among whites. Poor whites don't always quite agree with that, but enough of them do often enough to sustain the whole system for two hundred fifty years without many serious challenges from within the white community. When such challenges do arise, they're generally instrumental: whites from less-enslaved areas make demands of more-enslaved areas for infrastructure, more say in state government, etc and threaten slavery as a bargaining chip. It rarely gets them everything they want, but it does get them real concessions on top of the general buy-in that virtually every white American of the era has from being horrendously white supremacist.
u/freedmenspatrol answered your question directly, but you might find some additional context in an answer I provided a year ago about the fluctuation of slave prices in the years leading up to abolition. My answer there includes a discussion of this chart of slave prices, and of regional variation as the Civil War progressed.
It also might be important to note that towards the end of slavery, many slaves were being taken from the fields and put to work in other, dangerous, occupations. Feeding the coal into steam engines and coal mining were two jobs that received perhaps the most of the shifted slaves, and both saw many slaves burnt to death, albeit underground for those in mining. The practice of using slaves arose to replace the high wages required to get a freeman to do the same job. This led to the price of slaves increasing further at the same time of the fatality rate rose in these jobs (perhaps due to new “workers” lacking expertise, perhaps to lack of care about the well-being of slaves). The high cost of slaves and the high fatality rates led to the creation of a new type of business in the slave economy. Despite the state of New York being a “free” state (slavery outlawed), it was upon Wall Street that the first company was based that began selling life insurance for slaves, providing a method for keeping the practice of using slaves affordable for these dangerous occupations. Currently the third largest provider of life insurance, New York Life sold its first slave policies in 1846. In case it interests you, several other recognizable companies also engaged in this practice, most notably Aetna. Other companies allowed the use of slaves as collateral for loans, which further increased the value of owning slaves. Some have apologized, like JP Morgan and Wells Fargo, while others avoided all mention of it, like AIG.
Thank you to the NYT for bolstering my memory with the details, like company names.