What is the difference between function and formula in Excel?

Solution 1:

A formula is statement written by the user to be calculated. Formulas can be as simple or as complex as the user wants. A formula can contain values, references to cells, defined names, and functions.

All formulas must start with the equals sign. =1+2+3

A function is a piece of code designed to calculate specific values and are used inside formulas. Functions to sum values, calculate a trigonometric cosine, and to calculate the current time are built into excel. Additional functions can be defined using Visual Basic.

Functions are typed alongside parenthesizes, where in the arguments if any are listed in between. To use functions in a formula, for example

=COS(3.14) will return the calculated cosine. =NOW() returns the current time. =SUM(1+2+3) *2 will multiply the sum by 2

Source

Solution 2:

A function is a built-in operation, such as SUM(), AVERAGE(), etc. A formula (also known as an equation) is something that the user defines, and can use/refer to various functions in it. A formula starts with an = sign, such as =(D1+D2)/A$3. They are similar in that both return a result based on the calculations that each performs. The difference is that a function is a built-in calculation, while a formula is a user-defined calculation. A formula could just use a single function.

For example, if you enter =AVERAGE(A1:A56), that is a formula, using the AVERAGE function. If you enter =SUM(G4+A5) - 25 * MIN(B3:B6), that is a formula which uses both the SUM function and the MIN function, as well as standard mathematical operators (-, +, *).