We were clearing up our house of unloved and unnecessary possessions before a move and decided to sell around 40 books that we'd never read or likely never reread.
We hauled them to a Half Price Book store. The lady at the counter told me that they have a computer program that calculates the offer price for each book.
That's an interesting programming puzzle.
There are 3 factors I'd take into consideration: (1) the price at which it will sell, (2) the average time to sell (payback period), (3) risk and profit buffer
These are related variables that can influence each other, but we can simplify the problem by treating them as independent varibles. For (1), we can assume it's half the average retail price across Amazon and maybe a couple of retailers. (2) is tricky as it involves predicting the future. We can use the past book sale date to do that. I'd use a weighted average of the recent average time to sell for (a) the very same book, (b) for the author, (c) for the category (could be multiple categories like genre, condition, hardcover, etc), and (d) for all books in general. For (3), I'd just use a flat constant overall or by category*.
You can also be fancy and use a black-box machine learning algorithm, but I don't know enough to say how.
Anyway, I was disappointed when she offered us just $25, or ~50c per book. A good lesson to borrow books from the library than buy to save both money and clutter.
Note
* A marketplace, like Amazon, seems like a more efficient business model in some ways as they don't have to worry about paying upfront (cashflow) and inventory risk.