It's a tricky question to answer. I've found that the amount of editing a project needs depends very much on what type of piece it is and how long it is.
When I write a short blog post or newsletter, I don't spend much time on editing – I'll tweak a sentence here or there, and check for typos, but I don't normally make big changes.
With my novels, though, I probably clock up far more hours on the editing (redrafting, more redrafting, going through my editor's feedback, making my own edits, proofreading...) than I do on the actual drafting.
Here are a few tips to help you do the right amount of editing, without going over the top:
#1: Plan More, Edit Less
Generally, I've found that the more I plan in advance, the less editing I later have to do.
This works very well for me with blog posts (largely because they're short and follow a straightforward structure). I find it much harder to plan fiction. With my novels, I just accept that I'll spend a lot of time getting the first draft into shape, and that I'll cut and change a lot along the way.
So it's entirely up to you how much you plan and how much you edit ... but be aware that if you choose not to plan, you'll have to pay for it at a later point. ;-)
#2: Get a Second Opinion
While you probably won't run everything you write past someone else, it can be very helpful to get a second pair of eyes on anything that's important. I'd definitely advise getting an editor, or at least a good beta-reader, for things that you're going to be publishing yourself and selling to customers (e.g. an ebook / print-on-demand book).
Often, someone else can point out things that aren't quite working: that piece you thought was almost finished might need a bit more tweaking than you'd anticipated. On the flip side, they may tell you that it's fine and that you're worrying unnecessarily!
#3: Draw a Line Somewhere
Only you can make the decision to stop editing. It's not always an easy decision ... but at some point, you do need to let go of your blog post / novel manuscript / short story / article / poem.
At this stage, I often have to tell myself, "Finished is better than perfect." I still remember when, a few years ago, I sent off a short story on the day of a competition deadline. I was convinced it needed more editing: it wasn't, in my opinion, my best work. I nearly didn't send it in at all.
But I did – and, to my astonishment, it won first prize. It may not have been a perfect story, but it was finished, and that was what mattered.
Deadlines can be a great way to draw that line; if you don't have an obvious deadline like I did, find another way to set one. You could hire an editor and set a date to send them your manuscript, or you could let all your readers know when your new book will be available.
It's easy to under-edit, and rush unfinished work out too soon. It's also easy to over-edit, and carry on tweaking something that's already good enough. Aim to find a good balance between the two.