Blog · Orma · · 5 min read

How Much Time Do I Actually Spend Coding?

Most developers overestimate their coding time by 2-3x. Here is how to measure it accurately and what the data typically reveals.

Ask a developer how many hours they code per day and most will say something between 6 and 8. Ask their time tracker and the answer is usually between 2 and 4. This gap — between perceived coding time and actual coding time — is one of the most consistent findings in developer productivity research, and it has profound implications for how we think about our work.

The Perception Gap

The reason developers overestimate their coding time is not dishonesty. It is a categorization error. We think of ourselves as "coding" whenever we are doing something work-related at our computer. But writing code — actually typing characters into an editor, saving files, running builds — is a fraction of what a developer does in a day.

A typical 8-hour workday for a developer breaks down roughly like this:

These numbers are not hypothetical. They come from studies by Microsoft Research, Google's engineering productivity team, and aggregated data from tools like WakaTime. The 2-4 hour range for active coding is remarkably consistent across companies, seniority levels, and tech stacks.

What Counts as "Coding"?

This is where measurement gets tricky, and where different tools give you different numbers. There are two fundamentally different ways to measure coding time:

App-Level Tracking

Tools like RescueTime track which application is in the foreground. If VS Code is the active window, you are "coding." This approach is simple but crude. Having VS Code open while you read a long error message, think about architecture, or wait for a build to compile all counts as coding time. App-level tracking typically reports 4-6 hours of "coding" per day — higher than reality because passive screen time gets included.

Heartbeat-Based Tracking

Tools like WakaTime and xeve's VS Code extension use heartbeat-based tracking. They detect actual activity — keystrokes, file saves, cursor movements — and only count time when you are actively interacting with the editor. If you stop typing for 5-10 minutes, the tracker considers you inactive. This approach typically reports 2-4 hours per day, which is closer to true active coding time.

The difference between these two methods is substantial. A developer who app-level tracks at "5 hours of VS Code" might heartbeat-track at "2.5 hours of active coding." Both numbers are accurate. They just measure different things. Knowing which one you are looking at matters when interpreting your data.

Why 3-4 Hours Is Actually Excellent

When developers first see their real coding numbers, the reaction is usually alarm. "I only coded for 3 hours? What was I doing all day?" But 3-4 hours of focused, active coding is not a failure — it is the upper end of what sustained cognitive work allows.

Deep work research by Cal Newport and others consistently finds that most knowledge workers can sustain 3-4 hours of truly focused cognitive work per day. Beyond that, quality degrades. You make more mistakes, write worse code, and create technical debt that costs more to fix later than the extra hours saved. The developers who claim 8 hours of coding are either measuring app time (not active coding), working in short bursts with lots of breaks (which is fine but is not 8 continuous hours), or heading toward burnout.

The goal is not to maximize coding hours. The goal is to protect the 3-4 hours you have and make sure they are spent on the highest-impact work.

Where the Rest of Your Time Goes

Once you accept that 3-4 hours of coding is normal, the natural question is: how should the other 4-5 hours be spent? This is where app-level tracking becomes valuable. By combining editor-level coding metrics with system-level app tracking, you get the full picture:

How to Measure It

If you want accurate coding time data, you need heartbeat-based tracking in your editor. WakaTime is the most established option with support for 20+ editors. xeve's VS Code extension and Claude Code hook provide the same heartbeat-based tracking but also combine it with system-level app tracking, so you see both your active coding time and everything else in one dashboard.

The key is measuring consistently for at least 2-3 weeks before drawing conclusions. A single day is noisy — you might have an all-meetings Monday or a no-meetings deep-work Friday. Weekly averages smooth out the noise and reveal your actual patterns.

What to Do With the Data

Once you have 2-3 weeks of coding time data, here is what to look for:

The developers who produce the most impactful work are rarely the ones who code the most hours. They are the ones who code during the right hours, on the right problems, with the fewest interruptions. Measuring your actual coding time is the first step toward becoming one of them.