Microsoft Excel formulas with examples

Can Microsoft Excel formulas be easy to learn? Yep! This tutorial explains the very basics of Excel formulas for beginners, with detailed steps on how to write and use them. It also provides a number of advanced formula examples for experienced users. You will be amazed how simple creating formulas in Excel actually is.

If asked what Microsoft Excel is about, what would be your answer? Right, it's all about storing and crunching numbers. You can use Excel to calculate percentages and compound interest, count and sum cells based on specific criteria, find average, and even get a sample deviation of a given set of values. All this can be done by using Excel formulas.

In this tutorial, we are going to learn the basics of creating and using formulas in Excel. And because one of the most efficient ways to learn is through practice, we will also discuss a number of formulas examples to make things easier to understand. Here's a list of topics we are going to cover:

Microsoft Excel formulas - the basics

In MS Excel, formulas are equations that perform various calculations in your worksheets. Though Microsoft has introduced a handful of new functions over the years, the concept of Excel spreadsheet formulas is the same in all versions of Excel 2016, Excel 2013, Excel 2010, Excel 2007 and lower.

  • All Excel formulas begin with an equal sign (=).
  • After the equal symbol, you enter either a calculation or function. For example, to add up values in cells B1 through B5, you can either:
    • Type the entire equation: =B1+B2+B3+B4+B5
    • Use the SUM function: =SUM(B1:B5)
  • Press the Enter key to complete the formula. Done!

Microsoft Excel formulas

Elements of Microsoft Excel formulas

When you make a formula in Excel, you can use different elements to supply the source data to the formula and indicate what operators should be performed on those data. Depending on the formula type that you create, it can include any or all of the following parts:

  • Constants - numbers or text values that you enter directly in a formula, like =2*3.
  • Cell references - reference to a cell containing the value you want to use in your Excel formula, e.g.

    =SUM(A1, A2, B5).

    To refer to data in two or more contiguous cells, use a range reference like A1:A5. For example, to sum values in all cell between A1 and A5, inclusive, use this formula:

    =SUM(A1:A5).

  • Names - defined name for a cell range, constant, table, or function, for example =SUM(my_name).
  • Functions - predefined formulas in Excel that perform calculations using the values supplied in their arguments.
  • Operators - special symbols that specify the type of operation or calculation to be performed.

Basic elements of Excel formulas

Operators in Excel worksheet formulas

To tell Microsoft Excel what type of operation you want to perform in a formula, you use special symbols that are technically called operators. There exist 4 types of operators in Excel:

Using arithmetic operators in Excel formulas

These operators are used to perform basic mathematical operations such as addition, subtraction, multiplication, and division.

Operator Meaning Formula example
+ (plus sign) Addition =A2+B2
- (minus sign) Subtraction
Negation (reversing the sign)
=A2-B2
=-A2 (changes the sign of the value in A2)
* (asterisk) Multiplication =A2*B2
/ (forward slash) Division =A2/B2
% (percent sign) Percentage =A2*10%
(returns 10% of the value in A2)
^ (caret) Exponential (power of) =A2^3
(raises the number in A2 to the power of 3)

For example, if you have an item price in cell A2 and VAT in cell B2, you can calculate the VAT amount by using the following percentage formula: =A2*B2
Using mathematical operators in Excel formulas

Comparison operators in Excel formulas

In Microsoft Excel formulas, comparison, or logical, operators are used to compare two values. The result of the comparison is always a logical value of TRUE or FALSE. The following logical operators are available in Excel:

Comparison operator Meaning Formula example
= Equal to =A2=B2
<> Not equal to =A2<>B2
> Greater than =A2>B2
< Less than =A2<B2
>= Greater than or equal to =A2>=B2
<= Less than or equal to =A2<=B2

For example, formula =A1=B1 returns TRUE if cells A1 and B1 contain the same value (number, text or date), FALSE otherwise.

For more information and examples of using comparison operators in MS Excel formulas, please check out the following tutorial: Excel logical operators - equal to, not equal to, greater than, less than.

Text concatenation operator

Text concatenation operator in Excel is the ampersand symbol (&). You can use it to join two or more text strings in a single string.

For example, if you have country codes in column A and telephone numbers in column B, you can use the following formula to get the telephone numbers combined with the country codes:

=A1&" "&B1

In the above formula, we concatenate a space " " in between to make the numbers better readable:
Using the text concatenation operator in Excel formulas

The same result can be achieved by using the CONCATENATE function, and the following tutorial explains all the details: How to combine text strings, cells and columns in Excel.

Reference operators in Excel formulas and functions

To supply ranges to MS Excel formulas and separate arguments in Excel functions, the following operators are used.

Colon (:) - it is a range operator that allows you to make one reference for multiple cells located between 2 cells that you specify.

For example, range A1:A00 includes 100 cells from A1 through A100. To find an average of those 100 cells, you use the following formula:

=AVERAGE(A1:A00)

You can also refer to the entire column (A:A) or the entire row (1:1). For example, the following formula finds the total of all numbers in column A: =SUM(A:A). Find more about whole-column and whole-row references.

Comma (,) - is used to separate arguments in Excel spreadsheet formulas. For example, the formula =IF(A1>0, "good", "bad") reads as follows: if A1 is greater than zero, return "good", otherwise "bad".

Note. Comma is the default List Separator in North America and some other countries. In European countries, comma is reserved as the Decimal Symbol and the List Separator is usually set to semicolon (;). In this case, you need to separate a function's arguments with semicolons, e.g.

=IF(A1>0; "good"; "bad")

So, if you are trying to make a formula in your worksheet, but Excel does not accept it and throws up an "invalid formula" error, go to your Regional Settings (Control Panel > Region and Language > Additional Settings) and check what symbol is set as List Separator there. It is that symbol that you need to use to separate arguments in your Excel formulas.

Space - it is an intersection operator that lets you get the cell(s) common to the two references that you specify. For example, if you a list of items in column A and some related data in other columns, you can get a value at the
intersection of a given column and row by using a formula like this:

=B3:D3 C2:C4
Use the intersection operator to get a cell common to the two references that you specify.

For a real-life formula example, see how you can do two-way lookup in Excel by using named ranges & space operator.

Excel formula types

Formulas that you create in your Excel spreadsheets can be simple or complex:

  • Simple Excel formulas perform just one mathematical operation, for example =10*5 or =SUM(A1:A10)
  • Complex (advanced) Excel formulas include more than one calculation, for example =10*5+20 or =SUM(A1:A10)/2

Further on in this tutorial, you will find the detailed steps for making both types of Excel spreadsheet formulas.

How to create formulas in Excel

As already mentioned, any Excel formula starts with the equal sign (=). So, whatever formula you are going to write, begin by typing = either in the destination cell or in the Excel formula bar. And now, let's have a closer look at how you can make different formulas in Excel.

How to create simple formulas in Excel

Although simple Excel formulas perform just one calculation, they can do this in many different ways. You can supply the source data as constants, cell references, or defined names, and perform calculations by using mathematical operators or Excel functions. For detailed steps, please see the following resources:

How to create advanced formulas in Excel

When you have some experience with simple Excel formulas, you may want to perform several calculations within a single formula. And the following examples show how you can do this.

Creating complex formulas with constants and mathematic operators

For a complex Excel formula to calculate correctly, certain operations must be performed before others. The default order of operations in Excel formulas is this:

  • Mathematical operations enclosed in parenthesis
  • Power of (exponential calculations)
  • Multiplication and division, whichever comes first in a formula
  • Addition and subtraction, whichever comes first in a formula

For example, you can use the following formulas to calculate the total and commission:
Complex Excel formulas with constants and mathematic operators

And now, let's break down these formulas to see how Microsoft Excel calculates them:

Total formula: =$B2*$D2+$B2*$D2*$C2

  • 1st multiplication: $B2*$D2 (price*qty. = amount)
  • 2nd and 3rd multiplications: $B2*$D2*$C2 (price*qty.*VAT % = VAT amount)
  • Addition: amount + VAT amount = total

Commission formula: =($B2*$D2+$B2*$D2*$C2)*10%

To calculate the 10% commission, you need to multiply the total by 10%, so you enclose the previous calculation in brackets, and got the result you want.

Of course, nothing prevents you from multiplying the total already calculated in column E by 10%, in this case the formula would reduce to a simple calculation =E2*10%. However, in large worksheets, it makes sense to write independently calculated formulas, so that removing a column with one formula wouldn't break the others.

Excel formulas with nested functions

In Microsoft Excel formulas, nesting one function within another means using one function as an argument of another function. In modern versions of Excel 2016, 2013, 2010 and 2010, you can use up to 64 nested functions. In older versions of Excel 2003 and lower, only up to 7 levels of functions are allowed.

Here is a very simple example of a nested Excel formula that includes the SUM function to find the total, and ROUND function to round that number to the nearest integer (0 decimal places):

=ROUND(SUM(B2:B6),0)
An example of Excel formula with nested functions

Of all Excel functions, IF is nested more often than all others. As you probably know, the IF function is used to evaluate a specified condition and return one value when condition is met, and another value when the condition is not met. However, quote often you have to deal with situations where there are more than two possible outcomes. And if this case, you can write several IF functions and nest them into each other:
Using nested IF functions in Excel

For the detailed explanation of nested IF's syntax and advanced formula examples, please check out the following tutorial: Using nested IF functions in Excel.

Array formulas in Excel

Array formulas in Excel are advanced aerobatics. A single Excel array formula can perform thousands of calculations and replace hundreds of usual formulas. Learning array formulas certainly requires some time and effort, but it's worth it.

Since this tutorial is purposed for beginners, I won't intimidate you by the definitions of array constants and complex multi-line formulas. I'll show just one very simple example of an Excel array formula that demonstrates what they are capable for.

Supposing you have 2 columns of numbers, column A and B. And you want to know how many times column B is greater than or equal to column A when a value in column B is greater than 0.

This task requires comparing two ranges and you can do this by using the following array formula:

=SUM((B2:B10>=A2:A10) * (B2:B10>0))
An example of an Excel array formula

Note. To enter an Excel array formula correctly, you have to press Ctrl+Shift+Enter instead of conventional Enter stroke.

To learn more about Excel array formulas, please see the following tutorials:

Excel user defined functions

Although Microsoft Excel has hundreds of built in functions, you still may find yourself faced with a challenge for which no predefined Excel function exists. In this case, you can create that function yourself... or have somebody create it for you :)

Such custom functions are called User Defined Functions (UDFs), and they are especially useful for advanced mathematic or engineering calculations. Like macros, user defined functions are written in VBA (Visual Basic for Applications). As an example, you can review and download custom functions created by our team to count and sum cells by color.

Absolute, relative and mixed cell references in Excel formulas

There exist 3 types of cell references in Excel: absolute ($A$1), relative (A1) and mixed ($A1 or A$1). All three of the above references refer to the same cell, and the dollar sign ($) is used only for one purpose - it tells Microsoft Excel whether to change or not to change cell references when the formula is moved or copied to other cells.

Absolute cell reference ($A$1) - the $ sign before the row and column coordinates makes a reference static, and lets you copy a formula without changing references.

Relative cell reference (A1) - a cell reference with no $ sign changes based on relative position of rows and columns in a spreadsheet.

Mixed cell reference - can be of 2 types:

  • Absolute column and relative row ($A1) - the $ sign in front of the column letter locks the reference to the specified column, so the column never changes. The relative row reference, without the dollar sign, changes depending on the row to which the formula is copied.
  • Relative column and absolute row (A$1) - the row's reference locked by $ doesn't change, and the column's reference does.

The following image shows how different reference types work in practice.
Absolute, relative and mixed cell references in Excel formulas

For more information about Excel cell reference and more formula examples, please see Why use $ in Excel formulas.

Tips and time-saving shortcuts for Excel formulas

Formulas in Excel are a powerful multi-faceted tool, and they can solve a great variety of tasks in your spreadsheets. Of course, learning various aspects of Microsoft Excel formulas and functions does take time, so you might feel there isn't enough time in the day to learn everything. Well, a good way to find more time is to save some time :)

  • To toggle between absolute, relative and mixed references in a formula, use the F4 key as demonstrated in Switching between reference types in Excel.
  • To view all formulas on the sheet, click the Show formulas button on the Formulas tab > Formula Auditing group or press the Ctrl+~ shortcut.
  • To edit a formula, press F2, or double click a cell, or click the formula bar.
  • To debug formulas in Excel, select a formula part and press F9. This will let you see the actual values behind cell references.
  • To copy a formula to all cells in a column, enter the formula in the first cell, select that cell, and hover the cursor over the small square in bottom right corner until it changes to a black cross (which is called
    the fill handle). Double click that cross, and you will get the formula copied through the entire column.
  • To convert formulas to values, select all cells with formulas that you want to convert, press Ctrl+C to copy those formulas, then press Shift+F10, then press V, and then hit Enter. Shift + F10 + V is the shortcut for Excel's Paste special - values only. If you are not sure you will remember this shortcut, then simply press a usual shortcut for paste Ctrl+V, click the small arrow to the right of the Paste button to open the drop-down list, and select Paste Values. For more information, see How to replace formulas with their values in Excel.

Microsoft Excel formulas with examples

Excel provides formulas for almost anything, and there exist tens or even hundreds of different functions in modern versions of Microsoft Excel. So, if you encounter a task for which you cannot work out a solution, most likely you are missing out on a formula that can do it for you. Before spending hours and hours on performing manual calculations, take a few minutes to review the following resources. It is a selection of the most popular MS Excel formulas with examples, grouped by categories.

Excel percentage formula

Excel sum formulas

Count formula in Excel

Average formula in Excel

Excel date formulas

Time formulas in Excel

Excel formulas for VLOOKUP

Excel conditional formatting formulas

Well, we seem to have finally got to the end. What was planned as a short Excel formula tutorial for beginners has nearly turned into a voluminous manual because there are so many different aspects of Excel formulas to cover. I am really thankful to everyone who has read this page to the end!

204 comments

  1. how to Calculate Gst Percentage Amount in below 1000 rupees and Above 1000 rupees ?
    per example 900 rupees is 5 % gst and 1000 rupees is 12% gst

  2. SIMPLER!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

  3. FORMULAR FOR MEAN IN CELL 3, IF CELL 1 = 20000, CELL 2=80000

  4. Al Wukair 3.50 Al Wukair 3.00 Al Wukair 2.00 Al Wukair 6.00 Al Jeryan 3.00 Al Jeryan 3.00 Al Jeryan 3.00

    above data is in horizontal i.e. in rows. number defined are overtime hours. how to sum for each location.

    advance thanks.
    amit lalchand kamwani

  5. fag

  6. can you please send me a formula for the below,
    Credit card outstanding is 1000 usd (for example) he/she have to pay minimum bill 50 USD or 2% whichever is higher. please need your cooperation .

  7. i have a sheet as under:
    A B C
    Vehicle Petrol Diesel
    700 60 0
    800 80 0
    345 0 90
    700 50 0
    800 75 0
    500 0 50
    345 0 80
    700 40

    i want all values of 700
    Vehicle Petrol
    e.g: 700 60
    50
    40
    Please what kind of formula can solve my this problem

    • Hello, Saqib,

      If your data range is A1:C9, please enter 700 in cell E2, paste the following array formula in the adjacent cell (F2) and press Ctrl + Shift + Enter to complete it:

      =IFERROR(INDEX($B$2:$B$9,SMALL(IF($E$2=$A$2:$A$9,ROW($B$2:$B$9)-1,""),ROW(A1))),"")

      Then copy the formula down along column F to see all the matching values for Vehicle 700.

      You can find more details how to Vlookup to return multiple matches in this blog post.

      Hope this information will be helpful for you.

  8. (2947552.44+10%*0.05%+12%+1)/63.10 formula kese lagau

  9. please create the simplest way how to calculate different calculations!

  10. well ive gotten the needed basics in Excel and congratulate the examples,formula etc,thanks Google.

  11. Pls. help with a detailed example for ^ symbol

  12. Hello,

    can you plz send me a formula for the below:-
    i have purchased Atta 1500 kgs for 5029 persons, scale of atta per man is 0.700 gm, i want to know how many persons are covered from total persons 5029

  13. what is the formula for this in Ms exel "(8.3*10^3)/9"

    • Please send me 2 example of each other
      1 Multiplication
      2 subtraction
      3 Division
      Plz help me fast please anyone tell me???????

  14. I don't understand anything here

  15. How to count poor grade using count if function

  16. I am working on splitting a track of land into parcels. The track of land has an amount money tied to it. Each parcel will be split from the larger whole based on acres. The money will then be split based on the acres of the parcels. Setting up the excel formulas isn't the problem. I seem to be ending up with more money than I started with. How is that possible? Is this a decimal issue? I end up with about $117 more than the whole started with.

    Thanks, Marissa

  17. I am having trouble figuring this one out. I'm trying to get I34=0 when cell F34=0 but when F34>160 I need it to put what is in Cell H34.

  18. Could anyone help me write a function or direct me to a resource that I can use to write:
    A1 * (B1 or C1 when B1 or C1 is different from zero or different from 'blank')
    The B1 or C1 values will be attributed from a pull down menu and it will be either B1 or C1)
    Thanks a million!!!

  19. this is vary good formula for us. I understand that.....

  20. Differentiate vividly the difference between The Two type of formulas in ms excel giving two examples

  21. Hello everyone,
    I need help with a formula, I'm trying to come up with a formula that will calculate in the same row two possible different operations.
    For example B5-C5 or B5+D5 calculate the total of ether equation depending if it's a credit or debit. I don't know if I'm making myself clear. TIA

    Due Credit Debit Balance
    $99.27 $87.40 $11.87

  22. how do I add 10% to my price using the formula

    • Hi Gift,

      The generic formula to increase an amount by percentage is this: = Amount * (1 + %)

      To add 10%, multiply your price by (1+10%) or simply by 1.1. For example, if the price is in cell A1, the formula is =A1*1.1

      For more information and formula examples, please see How to calculate percentage in Excel.

  23. If I want to add C1 & C3 and display the result in C3?

  24. Hi very nice technological and teaching Excel formula simple

  25. I need to know how to: input numbers, each in its own cell.I have a formula which I execute in a cell. I make a PDF file for others to view.
    I want to see the numbers that were used in the formula to be automatically inputted into a written formula.I want this formula to be written out and shown in a cell. This will show viewers the formula with numbers that was used in execution of the formula.
    Hope you can help. Thanks.

  26. please send me vlookup formula and hlookup formula with example

  27. Hello Joseph,
    You can use the countifs function for this.
    =countifs(criteria_range,criteria,criteria_range,criteria)
    =countifs(A1:A10,">=1000",A1:A10,"<=5000")
    Where A1 to A10 is the range with employees salary

  28. I want to get the total employee who has a salary of 1,000 - 5,000(example) how can i formulate it? thanks in advance!!

  29. Very nice formula of excel

    • Dr sir you hereby requested to please avail me the latest examples for Excel. It was helpful.

  30. very nice teaching

  31. Level 0 If % of marks secured is LESS 40%
    Level 1 If % of marks secured is from 40% to 49.9%
    Level 2 If % of marks secured is from 50% to 59.9%
    Level 3 If % of marks secured is from60% to 69.9%
    Level 4 If % of marks secured is from70% to 79.9%
    Level 5 If % of marks secured is equal to 80% and above

    FOR EX

    PERCENTAGE 75 83 82 41 39
    LEVELS

    LEVELS HAVE TO DISPLAY in levels column

  32. hi. I have had a hard time making formula for the following problem in excel. can someone help?

    please give me the true formula.
    this is the problem.

    if F15 is within 0.26-0.75 and H15 is above 0.20 the value returns to "retained"

    if F15 is within 0.26-0.75 and H15 is below 0.20 the value returns to "revised"

    if F15 is not within 0.26-0.75 and H15 is above 0.20 the value returns to "revised"

    if F15 is not within 0.26-0.75 and H15 is below 0.20 the value returns to "rejected"

    I will be glad to your right response. thank u.

    • This is very simple. Just try this =IF(AND(F15>=0.26,F150.2),"Retained")
      =IF(AND(F15>=0.26,F15<=0.75,H15<0.2),"revised")
      =IF(AND(OR(F150.75),H15>0.2),"revised")
      =IF(AND(OR(F150.75),H15<0.2),"rejected")

    • If you are trying to make a nested formula for these situations then try this (since you haven't indicated whether the value of 0.20 is in above or below category, I have assumed it is above):
      =IF((AND(F15>0.26,F15=0.20)="truetrue","retained",IF((AND(F15>0.26,F15=0.20)="falsefalse","rejected",IF(AND(F15>0.26,F15=0.20)=FALSE,"revised","")))
      ?

    • =IF((AND(F15>0.26,F15=0.20)="truetrue","retained",IF((AND(F15>0.26,F15=0.20)="falsefalse","rejected",IF(AND(F15>0.26,F15=0.20)=FALSE,"revised","")))

      • I swear its glitching. Actual formula keeps changing.
        =IF((AND(F15>0.26,F15=0.20)="truetrue","retained",IF((AND(F15>0.26,F15=0.20)="falsefalse","rejected",IF(AND(F15>0.26,F15=0.20)=FALSE,"revised","")))

        • Formula in the form of a self that comes in another cell by writing in a cell

      • I swear its glitching. Actual formula keeps changing.

  33. I have a beginning balance column that I need to Name in another column. so if "Tom's" Beginning Balance of $410 (Column E), then column H needs to identify him on the Standard Plan

    If Joe's Beginning Balance is $500 (Column E), then column H needs to identify him on the Enhanced Plan

    Thank you

    • HI JRC.
      TRY THIS.

      =If(E1=410,"standard plan",IF(E1=500,"ENHANCED PLAN"))

  34. pls i wish to know the formulas for business account.

  35. Hello!
    i need some help
    if i have total amount 1000 which include 17% tax i need the true amount so what was the formula.

    • hi.farhan.
      try this formula.

      =A1*17%+A1

  36. OBALE 45 86 95 98 98 422 45 98
    ASALE 87 67 76 98 88 416 67 98
    OPETO 56 34 32 43 67 232 32 67
    ATWANI 88 76 78 87 76 405 76 88

    32 98

    please can someone solve for me this because these five students did the exam and these are their max. so what i need is can someone show me how to get MAX value,MIN value,AVERAGE value,POSITION value,GRADE value and RANK values. Thanks or your assistance in advance.

  37. How to minus ex : 15% margin in investment amount
    Need the excel formula

  38. plz send all vlookup & Hlookup formula with example, and micro command from beginer

    • Phle ek kam tera basic clear kar. phir VBA me jana. Pagal

  39. how do I enter a formula for the following
    Column A $5,000
    Column B gets 2500 Column C gets the difference I want Column d & E to calculate %. I also want to be able to change $ amount in B and have the $ amount and % automatically change based on whether I change $ or % amounts.

  40. Very good stuff. I have learnt a lot.

    Thank you All

  41. how to use in excel 2 nos*2500=5000

  42. i want know the all of excel formulas

  43. Please Send All Formula use excel sheet.

  44. What is the two types of components of formula that start in Letter O?

    • Ipotse

  45. Another comparison operator, that must be mentioned, is ”between”. Formula for interval between 4 and 7 is: AND(A1>4, A1<7)

    • Dr sir,I ask a reply my querry as follows:IF(A15800 & 300 if B1<5800.Pls let me know the formula.
      Kind regds.

  46. learn in excel formulas

  47. This formula is reyaly work Great work

  48. means if an employee salary is
    1- up to 5000 so 0% tax
    2- from 5001 up to 12500 2% tax
    3- from 12501 up to 100000 10% tax
    4- more than 100000 20% tax

  49. Hello,

    can you plz send me a formula for the below example

    An employee salary is 120000 so he will pay tax like
    1- 5000 = 0 tax
    2- 5001 - 12500 = 7500 x 2% = 150
    3- 12501 - 100000 = 87500 x 10% = 8750
    4- 20000 = 20000 x 20% = 4000

    so the total is 0+150+8750+4000= 12900

    waiting for your reply
    thanks
    Samimi

    • =IF(K1<5000,0,K1-5000)*2%-IF(K1<12500,0,K1-12500)*2%+IF(K1<12500,0,K1-12500)*10%+IF(K1100000 and Percentage will be variable 20%-10%
      K1=120000

      down four formula has been combined with + which is showing above

      IF(K1<5000,0,K1-5000)*2%
      IF(K1<12500,0,K1-12500)*2%
      IF(K1<12500,0,K1-12500)*10%
      IF(K1<100000,0,K1-100000)*10%

  50. sumif

Post a comment



Thank you for your comment!
When posting a question, please be very clear and concise. This will help us provide a quick and relevant solution to
your query. We cannot guarantee that we will answer every question, but we'll do our best :)