I have grappled with this problem as well. If this is a client that you will get additional work from, even perhaps of the same parameters as the first job, you almost have to make them aware of those extra hours, even if you don’t charge them this time ... for the simple reason you don’t want to have to continually give the client those extra hours free of charge.
Depending on how well versed and familiar the person you are dealing with is, let that guide and determine the content and extensiveness of your explanation. This has never been a negative for me and it does exactly what Daniel said, it builds trust.
But I too do what Daniel and Doug do - just estimates whenever possible Doing this weeds out the clients you didn’t really want anyway. That inflexibility may be due to multiple reasons, from individual personality to fixed budget parameters, but it has been my experience at the end of day the “why” doesn’t matter. As hard as it can be to turn down work ... in the long run it is most definitely to your benefit. If they are inflexible re: a hard and fast quote, that will carry over into other elements of that client relationship. When a quote is requested I never ask what they want, I give them just what Doug said: an estimate. I wait for them to insist on a fixed price. So initially don’t offer it, ever.
But what must also be said: from the POV of a creative freelancer since 16 years ... part of my job as a freelancer is educating my clients regarding the unknown elements of that process. When they are requesting a fixed quote is when that education starts.
Also, I have found the range of accuracy is in direct relation to complexity of the project ... the smaller, more simplistic the project, the more accurate my time estimates are.
So if you really want a project and it is very complex, with unknown factors - being aware of those factors - allow for extra time because it is always better coming in under then over budget for both you and the client. There have been times I have literally doubled my estimated hours for a quote because there were so many unknowns.
Always with first time clients, they themselves are an unknown, so you always want to add extra time to first time client projects. The unknown ranging from how well they have it together to even how clear and defined it is that the client wants ... all these can change the time investment on your end.
But allowing for that extra time, even if you go over, you aren’t loosing all of those hours so maybe 3-5 instead of 20.