I've posted this before, but it's worth posting again:
http://www.mosesavalon.com/calculator.shtml
There are many, many more factors involved with a record deal. The way advances are structured make sure that only one in 1000 artists breaks even or ever sees a royalty cheque. In the meantime the "advance" covers all the costs, the company makes money hand over fist and the artists still end up owing them money. Your average band must sell over a million CDs before they see a penny. Usually the record company will also limit the marketing on the second and third albums to make sure that they tank and that you never start earning from your back catalogue. That's why most bands are usually bankrupt by their third album, regardless of how well the first one sold.
When the record companies say they only make a small percentage, they are not counting the figures they take off for the studio and recording (which they usually own and make a further profit on). Then there are "creative accountancy" practices like taking the first 10% off the top for "record breakages" (when LP records have long been a thing off the past). Also don't forget that is based on wholesale prices, and in most larger countries the record companies own the retail stores and make a further profit from them too.
Selling an album on Amazon will cost you
at most 15% referral fee +$1.79 closing and other fees (the chart above takes the cost for single track sales - the worst possible scenario). That equals a total of $3.29 of the $9.99 (less than a third). If you are selling a load of them, you get on to a merchant package that will see unit sale costs dropping to $2.30 (about 23%) or less, leaving you a 77% share. If you are really moving product, you can negotiate with Amazon for even better pricing.