A function is a pre-written formula that performs a specific calculation, such as summing a range of cells or calculating the average of a range of cells. A formula, on the other hand, is a custom calculation that you can create using functions, operators, and cell references.