NEW: English for Tech Bundle → Save 40%
Your progress

Loading your progress…

Home
Code & Deliverynoun · /ˌɔːf baɪ wʌn ˈerər/

off-by-one error

In simple English

An off-by-one error is one of the most common bugs in software development. It occurs when a developer miscalculates loop boundaries or array indices by a single position. For example, if an array has indices 0 to 9, but the loop runs from 0 to 10, it will try to access an index that does not exist. This type of error is particularly tricky because the code often runs without crashing, but produces incorrect results or unexpected behavior. In real teams, developers frequently encounter these during code reviews and testing phases. The term is used both when discussing code logic and when debugging live systems. Many interviews include questions about off-by-one errors because they test understanding of how arrays and loops work in the chosen programming language.

Understanding what off-by-one errors are, how to identify them, and how to prevent them in code.

At a glanceCEFR B2
Commonness4/5
Versatility4/5
FormalityCasualFormalNeutral
Spoken ↔ WrittenSpokenWrittenBoth
Directness ↔ DiplomaticDirectDiplomaticDirect
RegionUS and UK
New app · Free lessons

Speak up in meetings. Feel confident.

Standup vocabulary, native examples, and quick practice — 100+ free lessons

Start learning freeNo card needed · Google or email

Say it like this

We have an off-by-one error in the loop
That is a classic off-by-one error
Watch out for off-by-one errors when you iterate

Real examples

in a standup

"We found an off-by-one error in the batch processing script that was causing it to skip the last record."

in a code review

"This loop starts at 1 instead of 0—are you sure this is not an off-by-one error?"

in a team meeting

"The reason the export only processed 999 items instead of 1000 was an off-by-one error in the iteration."

Don't say this

Handle with care. Do not use as a verb (e.g., 'we off-by-one errored the code'). It is strictly a noun describing a specific type of bug, not an action.

We need to off-by-one error this code before release.
We need to fix this off-by-one error before release.Off-by-one error is a noun, not a verb. Use 'fix' or another action verb with it.
The off-by-one error happened because the array started counting at 1.
The off-by-one error happened because the loop started at 1 instead of 0.Arrays in most languages are zero-indexed; mention the loop or index logic, not just the array.
I made an off-by-one error in my design.
I made an off-by-one error in my loop logic.Off-by-one errors are specific to loops, indices, and boundary calculations, not general design mistakes.

Other forms

noun (singular)

off-by-one error

"We discovered an off-by-one error in the database query."

noun (plural)

off-by-one errors

"Off-by-one errors are a common source of bugs in loop iterations."

Often used with

fix an off-by-one errorUsed when correcting the bug in code
introduce an off-by-one errorUsed when a developer accidentally creates this type of bug
catch an off-by-one errorUsed when identifying the bug during testing or review
classic off-by-one errorUsed to describe a textbook example of this common mistake

Similar words

boundary errorMore general term; off-by-one is more specific
fencepost errorAlternative technical name for the same problem; less commonly used
index errorBroader category; off-by-one is a specific type

Practice

Try it

4 quick exercises

Complete the sentence

1. The loop processes elements 0 to 10, but the array only has 10 elements. This is a _______ error.

Spot the mistake

2. Which sentence uses 'off-by-one error' incorrectly?

Pick the most natural phrasing

3. Your code processes one extra item by mistake. How do you describe it to your team?

Rewrite naturally

4. Rewrite this in natural tech English: 'The code is wrong because it goes through one more item than it should because the counting is wrong.'

Questions

Quick poll

Have you said "off-by-one error" in a standup this week?

Want more structured practice like this? Our English for Programmers course covers real workplace English in depth.

Your badges