Home / Definitions / Constant

Constant

Webopedia Staff
Last Updated May 24, 2021 7:39 am
In programming, a constant is a value that never changes. The other type of values that programs use is variables, symbols that can represent different values throughout the course of a program.

A constant can be

  • a number, like 25 or 3.6
  • a character string, like “this is a string”
  • Constants are also used in spreadsheet applications to place non-changing values in cells. In contrast, a spreadsheet formula can produce a different value each time the spreadsheet is opened or changed.