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.
Every day is different. Some days I’m in the zone, some days I’m standing outside the zone wondering why it’s not going well. I don’t think I can quantify the actual time though.
You answered it well enough - probably many of us feel the same, I know I do:-).