Paperback retail price: $15 Amazon takes 40% of retail: -$6 Amazon charges you full cost of printing: -$2.72 Your cut: $6.28, or 42%.
Ebook retail price: $5 Amazon takes 30% of retail: -$1.50 Amazon charges you a "digital delivery fee": -$0.35 Your cut: $3.15, or 63%.
This method of calculation, if not the specific values, are standard. Note that this is a MUCH better per-unit that you'd get from a traditional publisher. Often they will take 15% of retail for their margin, but they have to sell copies to bookstores at 60% off retail. So a $15 book might net you a buck, while they take home three.
It's justifiable because they take the risk on printing large numbers of books, distribution, contacts, marketing, etc. But a justifiable deal and a good deal are not always the same thing.
A publisher would have to sell 6-8X more books than you can by yourself before you'd make the same revenue. Meanwhile they would own your copyright and other things like the right to publish a sequel.
Btw, those are the real prices of my book. It's not expensive, not cheap. Maybe I'm pricing the digital version too low, but figuring that out is part of the game.
I used the number 9.99 because for a long time it seemed to be the "standard" price for an ebook. Lately the costs have been going up pretty rapidly.
Pricing a product does take a lot of time and research. I haven't published a book before, but I have bought lots of ebooks. When I look at a book on Amazon, if the price of the ebook is at least 33% less than the price of a paperback or hardcover, I'll at least consider it. If there isn't a significant price advantage, I wouldn't ever purchase an ebook that is readily available on paper.
I think that the best bet is to first decide how much money per book you want to have in your pocket once all is said and done. The amount of money you are comfortable receiving should guide your prices. Once you have a ballpark figure, you can tweak the price just a little to see if you can increase your volume.
It's, if I remember correctly, $0.15 per megabyte, rather than a flat $0.35. So this can be significant for books with lots of images.
So, that $20 book gets the publisher $10 in revenue.
Then, they had to print the book and ship it.
Plus, they don't get paid for the books that they print but don't sell. This is a surprisingly high number on some books.
Out of that they have to pay the author (usually 10% of the revenue, or $1) and the printing and shipping costs of ALL the books, not just the ones that sold (say $2-$3 per book sold).
Plus they have to pay to get the books a good placement on the shelves and pay for the people to go to all of the bookstores and arrange for them to buy the books.
That doesn't leave much.
Selling an e-book for $10 and getting 70% of that from Amazon or Apple seems like a good deal in comparison.
The real benefit of ebooks, though, is that publishing a book is way less risky when you don't have to sink a lot of costs into printing books.
Looking at this from the viewpoint of an author leads to an even more obvious answer...