There was a time I did updates to a web form application and I could break the work down to tasks in 10 minute increments and plan it would take six hours and I would really get it done in 5.8 hours. The design of the application helped because the changes I had to do were all straightforward within the existing framework.
An alternate model for "development" is fast cycle run-break-fix. Even if you are planning to deliver good "user stories" or whatever makes the project go forward there is some probability that the tester will say your code failed, some probability the tester is right and that the ticket gets sent back to you.
Sometimes before you send it to the tester you might try a few "failing" solutions before you find one that works; so instead of a model that you'll take "12 hours" to develop something rather something like a Markov process where maybe you get lucky on the first try, but it may take several attempts.
Hopefully you learn as much as you can from these attempts, maybe the first draft was written when you didn't understand the problem, the second draft was basically right but there were 1d4 places where it gets hung up because of an interaction you didn't think through and etc.