Some thoughts about estimation:
- Estimates are different than commitments. They are a best guess using available information about effort (not time) that a body of work may take.
- Estimates are not a single number - you should really think of estimate as either a range (lower/upper bound) or a value and a confidence factor.
- Estimates have a margin of error - to reduce this margin you generally need to spend more time performing analysis and evaluation. There is a point at which the effort to produce an extremely accurate estimate will begin to approach the effort of the task itself.
- Producing a reliable estimate based on vaguely defined body of work is extremely challenging. High margins of error should be expected in such circumstances.
- When estimating a task, the best guidepost is experience with similar tasks in the past.
- If historic information isn't available (either because the work effort is unique or you don't track this history) - the best you can do is decompose the task into the finest level of work that makes sense.
- Try to ask other people in your organization who may have experience with the system or codebase to review your estimates.