It's important to consider why you're self-publishing when considering the costs.
If this is a lifetime goal, then spending some money to make the book the best it can be is important.
If writing is your hobby, then consider how much money people spend on hobbies in general. Any hobby has some expenses associated with it.
If you are considering writing as a career and your book as part of a business model, then the costs are an investment in creating an asset that can put money in your pocket for the rest of your life and 50-70 years after you die according to copyright law. That is truly exciting, and I go into more detail in my book, How to Make a Living with Your Writing.
What are the main costs of self-publishing?
If you're doing this yourself without an author services company, as I do, the main costs for self-publishing are:
Editing
Most authors recommend using a professional editor to make your book the best it can be, but the cost will depend on the level of your writing, how long the book is, how much editing it needs and the editor you choose.
Range: $300 - $2000
In my experience, editing is more expensive at the beginning of your writing career as you are investing in becoming a better writer.
Lots more help and links to recommended editors here: www.TheCreativePenn.com/editors
Book cover design
Most authors would also recommend paying a professional cover designer for a book cover. DIY just won't cut it in this competitive online environment.
Range: $50 - $300
Lots more help and links to designers here: www.TheCreativePenn.com/bookcoverdesign
Formatting
Many authors do their own ebook and print book formatting in order to retain control, so this is often free or cheap if you're willing to spend the time upfront learning how to do it.
Range: $50 - $300
Links to formatting options and freelancers here: www.TheCreativePenn.com/formatting
These are the main outgoings in order to get your book published as an ebook and print book.
Audiobooks will cost you around $200 per finished hour if you hire your own narrator, but this is a more advanced form of publication and most authors only move into audio once they have ebook and print formats sorted and a budget to take things further.
Publishing your book is free on all the ebook retailers and aggregators and also for print on KDP Print.
There are minor setup costs for Ingram Spark and Findaway Voices.
There will be other costs associated with marketing, e.g. building an author website, email list management, advertising and other activities you choose to do.
If you choose to use an author services company to help you do these tasks as described in chapter 1.10, it's likely to cost a lot more, so weigh up what your goals are and what you're willing to learn to do yourself before you commit.