The short answer: Next to nothing if you don't mind the book looking and reading terribly. More than you think if you want your book to be indistinguishable from traditionally-published books.
I thought I'd break down how much it cost to publish my own book, The Insider's Guide to a Career in Book Publishing, to give you all an idea of the costs. Every book is going to be different. You will run into your own snags which will be different than mine, you will have different friends who can help you out, and you can explore other printing options. But it is not a get-rich-quick scheme. As of today my book has cost me $4571.14 and there are a few expenses still to come.
The biggest cost was design at almost $1500, which included the cover, permission for the cover image, a logo for my imprint, the interior design, and formatting the ebook. The front cover was about $129. The full cover with spine and back was $162. Coming up with the interior design was $62. Unexpected edits were almost $400. By far and away, the ebook formatting was the biggest chunk of this budget. Turns out my printer/distributor (IngramSpark) had an issue with one of the fonts we were using but it took us a while to figure that out and then another while to solve the issue. Hopefully that won't happen to you, which would have reduced my expense by about $600. Otherwise it would have been normal layouts. (For a client of mine whose book did not have these complication, his cost for the interior design and layout and ebook formatting was around $900, which is a more normal cost.)
As for the third highest expense, editing, I was lucky. As an editor, I was able to call on some favors. I had several college students do beta reads for free. I did trades of the content edit with a couple of friends. I got a discount off my copyedit ($225) and proofreads ($532) (yes you read that right, I did two proofreads which I highly recommend. Typos still slip through.) For most people your editing will be your highest expense. To reduce it, join a writing group, ask your pickiest and most critical friend for a read, and find beta readers. There is no substitute for a professional edit, but if your manuscript is already pretty clean, you can keep the cost down.
Then what people aren't expecting: Other. I spent $30 on advertising. One event I'm doing has a $100 fee. One person (not a friend) who I asked to write a short piece to be included in my book, I needed to pay $50 to. Registering your copyright costs $35. Each time you upload a new version of your book, there is a cost. At most of the events, I need to sell at least some books to the bookstore directly, so I have 208 copies right now in my trunk, which cost $326 (the more you buy and the slower you ship them affects the cost so there's not a strict cost per book for me to purchase them). These extra expenses added up to $381.
I am still anticipating another $400 invoice from my intern for her last work and for the posters and shipping. I am thinking about placing an ad in Shelf Awareness. I am designing and will shortly be printing bookmarks. I will be driving to all of these events. So I'll easily go over $5000, and maybe even head towards $6000 before all is said and done. My paperback is priced at $14.95 and the ebook is at $4.99. It will take a lot of books for me to earn back my costs on this book. So for those of you thinking that self-publishing is easy and cheap, it isn't. Oh, it's also taken me most of this past year to do all of the above, so it's also not terrifically fast.