Think of a number, double it and then double it again (i.e. four times the first number that pops into your head)
When a boss says "how long to complete" a project, he means the time when it's complete and deployed live to the users. A programmer will (naturally) only think about the time needed to complete the programming (the time to physically type out the solution to the problem) so you typically under estimate.
A rule of thumb would be:
The 'first number' is the number of days you think it will take you to complete the task based on the scope of the task as just described. (But of course, you've not been told everything).
The first multiple is the extra time needed to recode after the first demo / prototype given to the boss and he says "Good, great. But can you add..."
The second multiple is the time needed to recode the recode up to the correct standard for production.
The third multiple is time for testing, documentation & deployment and all the other admin stuff you need to do to actually get the thing out and live.
And the fourth multiple is your contingency for the above.
This should give you a safe estimate. Of course, you should insist that a more thorough planning and estimation exercise.