Stories We Like: A Guide to the Comma
c.1200, from Old French cost (12c., Modern French coût) "cost, outlay, expenditure; hardship, trouble," from Vulgar Latin *costare, from Latin constare, literally "to stand at" (or with), with a wide range of figurative senses including "to cost." The idiom is the same one used in Modern English when someone says something "stands at X dollars" to mean it sells for X dollars. The Latin word is from com- "with" (see com-) + stare "to stand," from PIE root *sta- "to stand" (see stet).
late 14c., from Old French coster (Modern French coûter) "to cost," from cost (see cost (n.)).