Estimating work you have never done before
Ranges, not numbers. Assumptions, not promises. How to quote unfamiliar work without gambling the margin.
Single-number estimates are a confidence performance. Nobody believes them, including you, and yet they end up in a contract.
The fix is not better guessing. It is quoting the shape of the uncertainty.
Method
Quote a range and name the assumptions
Give a low and high figure with the three assumptions that move the number, then sell a short paid discovery to collapse the range. Clients rarely object: you have made the risk legible instead of hiding it in a buffer.
Rule of thumb
If the high end of your range is less than double the low end, you probably understand the work well enough to fix the price.