If you're going with eBooks, and you should, consider using an author website to sell it "early", and once your book is finished publish it with Kindle Direct Publishing and Smashwords. Keep the author website / store up even after, so you can maximize returns. Price your eBook between $2.99 and $9.99.
If you're going to go with Print, start with Amazon Kindle Direct Publishing first, unless you're only needing a small run of books printed only in the USA (in which case TheBookPatch.com looks good). Once you're book is really done, and you're ready to branch out to see it available internationally and from other bookstores, publish it with Ingram Spark.
Get and use your own ISBNs (From MyIdentifiers.com -- buy 10 at a time), and make sure you opt out of Kindle Select!
More details are below.
Let's start with ebook formats first. Be aware that I'm writing this from California, with no "nexus" elsewhere, and electronic goods (when they are purely electronic) are not taxable here. That means I haven't worried much about accounting for VAT or Sales Tax, because I don't have to.
Leanpub is how I started out, but they've altered there terms several times. Right now their royalties are not substantially less than anyone else (they used to be), and you can get an even higher return selling through your own store (such as Selz.com). The one thing they have over everyone else is their Markua tools, and their focus on helping authors in the early stages -- you can "publish" before the book is complete on Leanpub. I'm not sure how useful Markua is to other people -- I don't use it at all. If you have a book in progress, this will let you sell copies early. But, they do take a cut -- 80%. Frankly, their business model seems a bit iffy right now, and I wouldn't like to put too many eggs in that basket. You won't need an ISBN at Leanpub. They pay 80% royalties, allow free updates (to a limit most authors are unlikely to hit). Leanpub has very limited reach, and doesn't distribute to anywhere else.
The cheapest and most cost effective way to sell your ebooks is to open your own author store. Sites like Selz.com will let you do this for free, and only charge reasonable transaction fees. With this approach you can get about 95% of the book sales. You can publish as soon as you want, send updates as often as you want, and don't need ISBNs or anything like that. On the downside, you have to do a little more work to set things up. You'll also have limited reach, and pretty much look like a fly by night operation. If you want to "pre-publish" before a work is complete, this is a way to do that, without paying that 20% to Leanpub. You can also leave this store open, and point to it from your personal author pages, even after you are working with the larger distributers.
Ingram Spark's ebook distribution service gets broad reach through relationships with the various outlets. You can use them to get to Apple, Kobo, even Amazon. And yet I would not recommend doing this. First off they charge to set up the book, typically $25. Then if you want to make a revision to the book, it's another $25. And then you're typically going to set it up so that you get only 45% of the royalties (or 40% if you really messed up and didn't opt out of the Amazon agreement.) . Furthermore, I found that their conversion of my ePub to Kindle format was inferior, leading to a poor reading experience on those devices. (I have some complex layout, and custom fonts, as the book is technical in nature.) I had much better luck generating my own .mobi format and working with Amazon directly. Their service takes forever to get back to you -- I'm still waiting while I try to remove my eBook from their distribution. In short, I would not use Ingram Spark for eBook. You also will need an ISBN if you use Ingram Spark.
Amazon (Kindle Direct Publishing)
Using the Kindle Direct Publishing was pretty easy, and this let me provide a .mobi file that was optimized for Kindle, addressing issues caused by converting from ePub. (To be fair most authors won't have these problems.) If you want to reach Kindle readers (and you do!), you should just set up a KDP account. One word though -- don't opt-in to Kindle Select!! Amazon is great, for distributing to Amazon customers. But you don't want to give away your exclusivity. There is a weird set of rules about royalties with KDP though. If you want to get their best 70% (which won't be in all markets, but the main ones) you need to set your List Price between $2.99 and $9.99, inclusive. (Other values are used for other currencies.) Deducted from your 70% rate is the cost to transfer the data to the user, which turns out to be pretty cheap -- less than a dollar typically. (But if you're only selling a $2.99 book, make sure you keep the file sizes down, or this will hurt your rates.) You can opt for a flat 35% royalty instead, which might make sense if your book is heavy on content, and its required if your book is outside the price points. (This is why you never see ebooks listed for $11.99 or something like that on Amazon.)
I just set up my account with Smashwords, and I'm thrilled so far. It looks like you'll get about 80% royalties through their own store, and 60% if your book is bought through one of their partners -- which includes just about everyone -- including Apple, GooglePlay, Kobo, etc. This gets you pretty much everywhere, except Amazon. But you did set up a KDP account already right? They take the royalty, and you're done. There is one fairly severe draw back to Smashwords -- they want you to upload your manuscript as a specially formatted Word document. (They do have direct ePub though, which you can use if you want. I did this because I don't have a Word version of my book, and it would be difficult to get one -- it was authored in Asciidoctor.) You will need an ISBN to get into their expanded distribution program, of course. They will offer to sell you one, but I recommend you not do that and use your own. (Especially if you're uploading your own ePub.)
Direct Retailer Accounts
You can maximize royalties by setting up direct accounts with companies like Apple, Kobo, and Barnes&Noble. In my experience, it just isn't worth it. Dealing with these all is a headache, and it takes forever. Some, like Google Play Store, are almost impossible to get into. As the list gets large, the percentage of your distribution that are covered here diminishes, consider whether that extra 10% royalty rate is worth the headache. Some of these will need ISBNs, and the pricing and royalties will all vary of course.
If you've spent a lot of time making a great book, you probably want to see it in print format, right? Nothing is quite the same to an author as being asked to sign a physical copy of professionally bound book of their own work. Note that it takes some extra effort to set up a book for print -- you'll need to ensure that you have a press-ready PDF (I had to purchase a copy of Adobe Acrobat DC so that I could properly preflight my files), and setting up the cover can be a challenge if you're not a designer.
Note that details such as print margins, paper weight, and hence cover sizes, can vary between the different printers. Be prepared to spend a lot of time if you decide to go down this road, and to have to spend a lot of time for each printer you use.
After doing some research, I decided to give these guys a shot at printing my first version. I was really impressed with the quality -- while the first printing of my book had a number of issues, none of them were the fault of TheBookPatch -- they were all on me. The problem with these guys is that they are tiny. Almost nobody has ever heard of them, and you won't get be getting this listed at places like Barnes&Noble. Additionally, they are rather expensive, particularly if you want to send books to places overseas. At one point I wanted to send one copy of my book to the Netherlands. The shipping cost was going to be about $80. Needless to say, my relationship with TheBookPatch came to an abrupt end. (I'd still recommend giving these guys a shot if you're printing books for your own use here in the USA.) One big advantage is that they were able to put together an attractive cover using their website cover designer, with no special skills. You also don't need an ISBN to print through TheBookPatch.com.
Ingram Spark has the best rates internationally, and is reputed to have excellent print quality. My book is available from them. They charge $49 to set it up, and $25 for updates. This is super annoying, so I wouldn't publish with them until and unless you know that you're ready and need international distribution or want to see your printed book available via Barnes&Noble or other retailers. They're also slow. I ordered 3 copies of my book a week ago, and they only confirmed that they are shipping them today. If you're serious about selling printed books widely, I would definitely go with them. But unless you anticipate the volume, I'd hold off. You will need an ISBN as well. With Ingram Spark, you set up your royalty rates which are usually 45% of net. Typically this means you'll get something like a 20-25% actual royalty, depending on the book.
Now available for authors, you can use Amazon Print on Demand. After setting up the layout, and doing the work to ensure the quality is good -- which can take some effort -- it's pretty easy. Amazon will sell you an ISBN if you want one -- I'm not sure if they are required for print books or not. (I already had one from my Ingram Spark journey.) Amazon gives a much better royalty, of 60% of net, and their printing costs for small runs seem to be fairly inexpensive, as is shipping. For example, my 430 page, 2 lb (7.5"x9.25" paperback) book cost about $6 to print, and about $10 to ship. That means that as my list price is $49.95, I can expect to receive about $20. Amazon will cut into their own margins to discount the book as well, to optimize the price. Having said all that, I'm still waiting for my proof, which Amazon apologized for taking an extra day or two to print -- I should be getting it in a couple of days (I opted for the cheap shipping -- you can't use your Prime account to ship author proofs which are made available to you at cost). Their paper is thicker than Ingram's and so I had to redesign the cover, and their margins are stricter (my page numbers fell outside their strict .5" margins), so I wound up having to re-do the whole layout. It would have been better if I had started with Amazon first.
There are other print-on-demand players, but I've heard enough complaints about print quality when using them, that I just avoided them. After all, if you're bothering to put your book into print, you want the results to reflect all the effort you put into it.