Hoooo... I still have grief with these; I take my best estimate and bump it up by at least 10%, and often double it.
Sometimes I still wish I'd scaled it up to the next unit as well (I think something will take 6 hours, I find I wished I'd said 12 days. I think it will take a day, it ends up taking a couple of weeks).
If I do overrun, I like to at least warn them in advance of the deadline that there will be a delay and reset the deadline - most people would understand that they are not your only client, and when you say "eight days" it means "sixty four work hours devoted to your job", not "Wednesday next week".
Repeat custom can be nice; you can tinker with what they already have and put something together you reckon they'll be wanting. Note how long something actually took and you can give them quite a good estimate of how long it will take to do 🙂. Then whack your tinkinering in (check it!) and put a note on the calendar to remind you when to tell them it's done.
Then go rockclimbing for the rest of the day 😉.