off-by-one error

noun

A logic error where a value, typically the number of iterations of a loop, is specified incorrectly, being either 1 less or 1 more than it should be.

Meanings

nounoff-by-one error (plural off-by-one errors)

plural off-by-one errors

  1. computingA logic error where a value, typically the number of iterations of a loop, is specified incorrectly, being either 1 less or 1 more than it should be.

    Using an incorrect relational operator or an incorrect final value of a loop counter in the loop-continuation condition of a repetition statement causes an off-by-one error.

    2005, Harvey M. Deitel, Paul J. Deitel, C# for Programmers, second edition, Prentice Hall Professional, →ISBN, page 164

    Synonyms: off-by-one bug, OBOE, OBO

Synonyms & antonyms

nounA logic error where a value, typically the number of iterations of a loop, is specified incorrectly, being either 1 less or 1 more than it should be.

Translations

Finnish yhdellä pielessä -virhe, off by one -virhe
  • yhdellä pielessä -virheTranslations
  • off by one -virheTranslations
German Um-eins-daneben-Fehler, Off-by-one-Fehler
  • Um-eins-daneben-FehlerTranslations
  • Off-by-one-FehlerTranslations
  • Off-by-one-ErrorTranslations
Polish błąd o jeden
  • błąd o jedenTranslations
Russian ошибка на единицу, ошибка неучтённой единицы
  • ошибка на единицу (ošibka na jedinicu)Translations
  • ошибка неучтённой единицы (ošibka neučtjónnoj jedinicy)Translations
Cite this entry
APA

off-by-one error. (n.d.). In WatkinsX Dictionary. Retrieved November 2, 2026, from https://dictionary.watkinsx.com/word/off-by-one%20error

MLA

“off-by-one error.” WatkinsX Dictionary, https://dictionary.watkinsx.com/word/off-by-one%20error. Accessed November 2, 2026.

Chicago

WatkinsX Dictionary, s.v. “off-by-one error,” accessed November 2, 2026, https://dictionary.watkinsx.com/word/off-by-one%20error.

Source: off-by-one error on Wiktionary, CC BY-SA 4.0.