About 25% of my (fiction) editing work is direct with authors, and the rest is split between two publishers. It my be of interest to note that these rates are close to what publishers pay their editors. That is to say, if you, as an author, were to traditionally publish your book, you would be paying this amount via royalties. Creating a professional product via self-publishing is not cheap, the costs (and income!) just shift from the publisher to the author.
I would add the suggestion to be prepared for the editor to request a look at the manuscript (not just a short sample) to prepare an accurate estimate. This has been my practice for some time, and it allows me to provide a flat fee for the entire project. This makes budgeting much less complicated for the author, although of course I am willing to bill by the hour if preferred.
Obviously there is a big difference. I actually started with screenplays (with some mild success) partly due to hearing that as long as you have a good story, the grammatical errors won’t be a big deal. Well, that was not true. Maybe if a producer liked the story or I was already established but every contest I entered always came back with feedback about the grammatical errors. Even if I won or placed as a finalist, I always received critique on that. Very little is spelling error, it was more about structure, etc.