I'll often say something like "I don't know off the top of my head, but if you want I can get back to you with an estimate."
Once it's clear that I'm going to spend some non-trivial amount of time working on the estimate, the answer is often, "No, don't bother."
On the other hand, if person asking does want me to get back to them, I now have the time to do a good estimate—research the problem, break down the parts of the solution, think about the unknowns. Even a "good" estimate is still squishy, but it does tend to be based on explicit assumptions, and often flushes out hidden design or spec issues.
Once it's clear that I'm going to spend some non-trivial amount of time working on the estimate, the answer is often, "No, don't bother."
On the other hand, if person asking does want me to get back to them, I now have the time to do a good estimate—research the problem, break down the parts of the solution, think about the unknowns. Even a "good" estimate is still squishy, but it does tend to be based on explicit assumptions, and often flushes out hidden design or spec issues.