How to Create a Formula in Excel:
Add, Subtract, Multiply, and Separate
(& more)

Written by co-founder Kasper Langmann, Microsoft Office Specialist.

Learning how to create a formula in Excel is easy.

If you have never known how to write a formula in your Excel spreadsheets, you are in the correct place.

This guide will walk you through each step of how to write a formula in Excel and how to understand them.

Kasper Langmann, Co-founder of Spreadsheeto

By the fourth dimension y'all become through this guide, you will know what a formula is and how to create your ain.

*This tutorial is for Excel 2019/Microsoft 365 (for Windows). Got a different version? No problem, you can nonetheless follow the exact same steps.

  • Conclusion: Wrapping things upwards

Go your FREE do file

Before you outset:

Throughout this guide, you need a data set to practice.

I've included one for you (for complimentary).

Click below and nosotros'll send it right over!

BONUS: Download the Formula Do File (with 12 pre-loaded exercises) to go along with this post.

What is a "Formula"?

So, what exactly is a formula?

It is simply a statement fabricated upward of 'operands' and 'operators'.

Say y'all want to summate the 15% discount off of $20.

In this argument, there are two 'operands': price ($20) and discount percent (15%).

The operator is multiply (*).

'Discount' is the issue.

Disbelieve = $twenty (price) * 15% (discount pct)

One key thing to note nigh formulas is that they must ever begin with an equal sign (=). If you lot do non begin your formulas with an equal sign, Excel will treat it equally a cord data blazon.

Kasper Langmann, Co-founder of Spreadsheeto

Now allow's come across what our disbelieve formula looks like in Excel.

Example of formula

Once you press enter, the formula will calculate the formula and show the result.

Result of formula

Note the formula shown in the box to a higher place the spreadsheet. This is the 'formula bar'. More than on that in a bit.

Now, await at the result if you lot input your formula without the equal sign.

Formula without equal sign

Nothing seems to be any different aside from the missing equals sign in front of the actual formula.

But now permit's come across what happens when nosotros click abroad from the jail cell containing the (partial) formula.

Kasper Langmann, Co-founder of Spreadsheeto
Result of formula without equal sign

Without the equal sign, it is just a string of text or numbers co-ordinate to Excel.

How to create a formula

Now allow's movement on to creating your own formulas.

The kickoff step to creating a formula is to blazon an equal sign into the cell where you volition exist placing it.

Equal sign in formula

Now yous are fix to begin the input of your actual formula.

If we wanted to split up 6 by 3, we would input the following:

6 divided by 3

You can also employ cell references instead of literal numbers.

Example of cell references
Cell reference mixed with literal number

Note, your formula is also shown in the 'formula bar' simply above the 'C' cavalcade of the worksheet.

You can always view the full formula and even edit it from the 'formula bar'.

If you lot click on a cell containing a formula, it will appear in the 'formula bar'. This means you won't demand to double click into the cell to really see the formula.

Kasper Langmann, Co-founder of Spreadsheeto
Double click to view formula

What is the difference between
a "Formula" and a "Function"?

In dissimilarity to formulas, functions are pre-built formulas that Excel offers.

For instance, the 'SUM' function in Excel simplifies the improver of two or more than numbers.

Instead of creating your own formula to add two number values, utilise the 'SUM' role!

Result of SUM function

While functions are pre-built formulas themselves, they still demand to begin with an equal sign.

You tin can combine more than one function in a formula.

How to add together in Excel

Now allow's look at the specifics of how to add together in Excel.

As you have already seen, this is a pretty simple task. But we will now look at some specific examples of how to add number values in Excel.

Kasper Langmann, Co-founder of Spreadsheeto

The nearly elementary way to exercise this is to type in the mathematical expression for calculation two numbers in a cell.

For example, just type '=2 + 2' in a cell of your choice and Excel will perform the requested calculation.

Simple addition in Excel

Annotation the formula in the 'formula bar' while the outcome we would await is in cell B2.

You lot can also use jail cell references equally the terms of your equation instead of literal number values.

Adding cell references

Once you type the equal sign, you can either type in the prison cell reference manually or click on the cell. Either method volition practise.

At present let's expect at mixing both literal number values and cell references in our formula.

Adding cell references and literal number

What if you need to add more two numbers? Well, you could always keep calculation more numbers to your formula.

Kasper Langmann, Co-founder of Spreadsheeto
Adding numbers to a formula

You can fifty-fifty go on to add cell references to the formula this fashion…

Adding multiple cell references together

But there is an easier way that we already touched on earlier… The 'SUM' office!

So, for adding many number values, you tin exercise the following:

Adding numbers using SUM

You just type '=SUM' and and then the numbers between parentheses and separated past commas.

This is how to make a formula in Excel to add together multiple numbers (come across the 'formula bar' in the figure above).

Excel makes things much easier when using the 'SUM' function with many cell references. Instead of using individual prison cell references, 'SUM' allows you to select and unabridged range.

Kasper Langmann, Co-founder of Spreadsheeto
SUM and ranges

Y'all tin can as well type the first and last cell of the range separated by a colon (:) and do the same matter.

SUM and example of range

You can also add more than than 1 range of cell references using the 'SUM' function.

Simply dissever your ranges with a comma.

SUM of separate ranges

Remember, you can always type the ranges manually. Or you tin highlight different ranges separated past commas.

SUM of manual entered ranges

How to subtract in Excel

Now let'south look at how to write a formula to subtract in Excel.

Since y'all already know how to add in Excel, learning to subtract iseasy.

Yous tin can decrease the same style y'all can add by simply changing the plus sign to a minus sign in a simple formula.

How to subtract in Excel

The same concept holds true when yous create a formula for subtracting jail cell references.

Subtracting cell references

You can even utilize the 'SUM' function to create a formula for subtracting numbers in Excel.

This is unproblematic.

You lot just need to brand certain y'all change signs for the numbers or values in cell references to do this.

For example, if we desire to utilise the 'SUM' role to decrease 2 from four, we need to write the formula equally follows.

Kasper Langmann, Co-founder of Spreadsheeto
Using SUM to subtract

The same holds true for cell references.

Using SUM to subtract cell references

You can modify the sign of the value that yous want to subtract from another value in the cell.

Then select the range similar we did before using the 'SUM' function when calculation.

Another example of using SUM to subtract

In one case you change the sign for the appropriate value, you can just select the range for your 'SUM' formula.

Change sign to appropriate value

While not as uncomplicated, this is withal an effective manner to subtract in Excel.

How to multiply in Excel

At present that you have seen how to write a formula in Excel to add and decrease, allow'south look at multiplication.

In Excel, you have to employ the asterisk (*) to multiply numbers.

So, let's showtime past clicking into a cell whatever typing an equal sign to begin to create our formula. And so let's write out the multiplication of 3 times 2.

Kasper Langmann, Co-founder of Spreadsheeto
Example of multiplication

You lot can as well utilise jail cell reference when multiplying.

Cell reference and multiplication

The concept is simple enough: The 'PRODUCT' function allows y'all to multiply more than two numbers at the same time.

PRODUCT function

As you brainstorm to type 'PRODUCT', the function shows itself and the caption of it in the tooltip box.

At present nosotros select the range of cells from A2 through A8.

PRODUCT function and ranges

At present press 'Enter' and the formula will summate the product of all the values in the range 'A2:A8'.

Result of PRODUCT function

How to divide in Excel

In this section, we are going to look at how to brand a formula in Excel to dissever.

In the case of creating a formula to divide in Excel, nosotros will apply the forward slash (/).

Kasper Langmann, Co-founder of Spreadsheeto

This separates the dividend and the divisor.

The dividend volition exist to the left of the forward slash whereas the divisor will be on the right.

As with the other formulas, we showtime our division formula with and equals sign.

Then nosotros type our dividend, the frontward slash, and finally the divisor.

Example of division

When we hit enter, we get the result of our formula.

Result of division

One special note about dividing in Excel is that y'all cannot divide whatever number by cypher.

If yous endeavour to do and then in Excel, yous will get the following error.

Division error

How to utilize roots in Excel

Excel has i built in function that allows yous to observe the square root of a number.

Information technology is 'SQRT' and it only requires one argument: the number you want to find the square root of.

Function SQRT

This is as straightforward as it gets.

Just remember that you cannot calculate the square root of a negative number – and neither can Excel. If you attempt to practise and so, you will go the #NUM! mistake.
Kasper Langmann, Co-founder of Spreadsheeto
Error from dividing with zero

Excel does take another built in function that tin help with this effect. The 'ABS' function returns the absolute value of a number.

Yous can nest the 'ABS' formula inside your 'SQRT' formula (like shown beneath).

This will help you avoid the '#NUM!' caused by a negative number.

Function ABS nested in SQRT

How to use exponents in Excel

You can also write formulas in Excel to heighten a number to some specified power.

There are two means to do this:

The first is by using the caret operator (^).

Example of exponent

Excel too has a built-in part that you can utilise called the 'POWER' function.

The first of the two arguments is the base and the 2d statement is the exponent.

POWER function

The 'POWER' function calculates the same result every bit the formula using the caret.

Example of POWER function

The gild of operations

What is the gild of operations?

It is the mathematical protocol that dictates the mathematical order in which operations occur.

The logic follows the acronym PEMDAS. Here's what each letter stands for…

Kasper Langmann, Co-founder of Spreadsheeto
  • P arentheses
  • E xponents
  • One thousand ultiplication and D ivision
  • A ddition and S ubtraction

In short: PEMDAS.

So, permit'southward break this downward a chip with some examples.

Permit'southward say you lot have a formula similar '=5+3*2'.

Multiplication of the iii by 2 takes place before the improver functioning.

The last consequence is 11.

Example of order of operations

If you place the addition operation within parentheses, the order of operations changes.

Impact of order of operations

Notation that the 5 gets added to the 3 and its result of 8 then gets multiplied by the two for a concluding outcome of 16.

This is quite a dissimilarity from the result of the previous example.

Await at the following formula and consider the following instance. This formula will summate the exponent first, the product 2d, and the sum last.

Kasper Langmann, Co-founder of Spreadsheeto

The result of the exponent function is 25 while the 'PRODUCT' result is 12.

These 2 terms are so added together for the outcome of 37.

Exponent first, product second, sum last

If we enclose a part of the formula in parentheses, the gild of operations changes.

This returns a different issue…

How a parenthesis changes the order of operations

Everything within the parentheses is calculated first.

Simplified, that is 12 + 5.

The resultant 17 is then raised to the power of 2, giving u.s.a. the terminal result of 289.

Because of the order of operations, nosotros see how dramatic the differences in the results. Knowing this protocol is instrumental in being able to effectively troubleshoot formulas in Excel.

Kasper Langmann, Co-founder of Spreadsheeto

Conclusion

This wraps up our guide on how to create a formula in Excel.

Equally you have seen, the concepts tin can exist pretty simple. Yet in that location are dissimilar approaches to formulas similar using literal values and/or cell references.

And then you have some options similar using some of the pre-built functions that Excel offers.

It is worth reiterating that whatever formula requires the equal sign for Excel to recognize it as such. Otherwise, you are just typing in numbers and strings.

Kasper Langmann, Co-founder of Spreadsheeto

Every bit you showtime to combine operations in your formulas, you must be aware of the 'Order of Operations'.

This will permit you to confirm the results of your formulas and help you create them more than effectively.

These concepts take repetition and continued use to really sink in. And so, become going and practice the different methods of creating formulas in Excel!

Kasper Langmann, Co-founder of Spreadsheeto