InfyCalculator
💻

Code Lines Per Hour Calculator

Turn lines of code and hours worked into a productivity rate — lines per hour, per working day and per week — with the usual caveats.

Lines of code written
Hours spent
Hours in a working day
Loading calculator…

How it works

Lines per hour = lines ÷ hours · Per day = lines/hour × day length · Per week = per day × 5

Lines of code per hour is a rough throughput measure: divide total lines by hours spent. It is useful for rough estimation and comparing your own runs, but a notoriously poor productivity metric — clean, concise code often means fewer lines, and thinking, testing and refactoring do not add lines yet are the real work. Industry averages including all overhead land far lower than a burst of typing suggests, often 10–50 finished lines a day.

Worked example

Writing 500 lines over 40 hours is 500 ÷ 40 = 12.5 lines per hour. At an 8-hour day that is 100 lines/day, and across a 5-day week, 500 lines — matching the input, since 40 hours is one full week.

Frequently asked questions

Is lines of code a good productivity measure?

Not really. It ignores quality, complexity and the fact that deleting code or writing a terse solution can be more valuable than adding lines. Use it for rough sizing and personal pacing, not for judging developers.

Why are professional LOC-per-day figures so low?

Studies that count finished, shipped code across a whole project — including design, meetings, debugging, testing and rewrites — often report 10–50 lines per developer-day. A productive coding hour produces far more raw lines than survive to release.

How can I use this for estimating?

If you know your realistic sustained rate for similar work, divide a project’s expected line count by it to ballpark the hours. Always pad heavily for testing, review and the unknowns that dominate real schedules.

Related calculators

This calculator is for educational purposes. Double-check important results before acting on them.