For me (as a programmer) it really varies a ton. I used to put in insane stretches, due to the medication I needed to take in the past and that is how I got used to things in college.
Now I work more regularly, but still can put in a solid 6+ hr day most of the time, and yet some days… yeesh I’m lucky if I can get a third of that. So I work more on other days to compensate.
Productive work with measurable results? Two hours. Four hours meetings. Two hours getting interrupted, forced socializing, and then trying to remember what it was I was about to do.
Sometimes I only have 2 hours of meetings but they are all 30 minute meetings with an hour or two between. So I am barely back in my flow by the time he next meeting rolls around.
The “flow” thing is what most non-IT folks don’t understand. It’s tough to jump back in and just start solving the same puzzle I was working on hours ago with no backtracking to figure out which micro piece of the 20 regular-sized pieces I was working on.
That’s probably why I would procrastinate on technical work with project management work back when I was in IT.
Sometimes when I really get into something, I just stay late and work on it while the office is empty.
Thankfully I’ve been in positions where if I work the rare 10-12 hour day, I can take the time off later in that timesheet cycle. It helps that I always have a bunch of results to show after those nights.