Formula
A computer formula is an expression used in software, most commonly spreadsheets, that performs a calculation on specific values or data. A formula can contain mathematical operators, cell references, and functions to produce a desired result.
Key characteristics of formulas
Initial equal sign: In spreadsheet programs like Microsoft Excel and Google Sheets, a formula must begin with an equal sign (=). This tells the software that the subsequent characters are a calculation to be performed, not just text.
Variables (cell references): Instead of using constant numbers, formulas often refer to the data in other cells. For instance, =A1+B1 adds the values from cell A1 and cell B1. If the values in A1 or B1 are changed, the formula automatically recalculates the result.
Operators: Formulas use mathematical operators to specify the type of calculation, such as:
+ for addition
- for subtraction
* for multiplication
/ for division
^ for exponents