How-to Guide 5 min read

Percentage Formula in Excel and Google Sheets (With Examples)

Excel and Google Sheets formulas for percentage of total, percentage change, adding or removing a percentage and marks percentage, plus fixes for errors.

percentage formula in excelhow to calculate percentage in excelpercentage change formula excelpercentage formula google sheetsexcel percentage of total

The short answer

Excel and Google Sheets have no special percentage function. You divide, then format the cell as a percentage. The part as a share of the whole is =A2/B2; percentage change is =(B2-A2)/A2; X% of a number is =A2*15%. Click the % button (or Format → Number → Percent in Google Sheets) to show 0.25 as 25%. To check a single answer without a spreadsheet, use the percentage calculator.

The one rule that avoids most mistakes

A percentage in a spreadsheet is stored as a decimal. 25% is the number 0.25. So:

  • If you write =A2/B2*100 and then also click the % button, you get 2500%. Use one or the other, not both.
  • Typing 15% in a formula is the same as typing 0.15. Both =A2*15% and =A2*0.15 work.
  • If a cell shows 0% when you expect 25%, it is probably formatted with no decimals and the value is 0.0025, which means a /100 is in the formula twice.

The formulas you will use most

What you wantFormulaExampleResult
Part as % of whole=A2/B245 of 18025%
% change (old in A, new in B)=(B2-A2)/A280 to 10025%
% change, a fall=(B2-A2)/A2100 to 80−20%
X% of a number=A2*15%15% of 2,400360
Increase by X%=A2*(1+18%)1,000 + 18%1,180
Decrease by X%=A2*(1-20%)1,500 − 20%1,200
Remove X% that was added=A2/(1+18%)1,180 incl. 18%1,000
Marks percentage=A2/B2423 out of 50084.6%

Every formula above works the same way in Excel, Google Sheets and LibreOffice Calc. The results were checked by calculation.

Percentage of total for a whole column

Say sales for five products are in B2:B6 and the total is in B7 (=SUM(B2:B6)). In C2 type:

=B2/$B$7

then drag it down to C6. The dollar signs lock the reference to B7 so it does not shift to B8, B9 and so on as you drag. Without them, every row after the first divides by an empty cell and shows #DIV/0!. Format column C as a percentage; the values should add up to 100%.

Percentage change, step by step

  • Put last year's figure in column A and this year's in column B.
  • In C2 type =(B2-A2)/A2.
  • Press Enter, click the % button, and drag down.
  • Positive results are increases, negative results are decreases.
  • Two things to know:

    • The base is the old value. Going from 80 to 100 is +25%, but going back from 100 to 80 is −20%. The same 20-unit gap gives different percentages because the base changes. Percentage gain needed to recover a loss explains why.
    • If the old value can be zero, the formula shows #DIV/0!. Wrap it: =IFERROR((B2-A2)/A2,"") leaves the cell blank instead.

    For salary increments, the same formula gives the hike percentage: new salary minus old salary, divided by old salary.

    Adding and removing tax or a markup

    • Add 18% GST to a base price: =A2*(1+18%). ₹1,000 becomes ₹1,180.
    • Find the base price from a GST-inclusive price: =A2/(1+18%). ₹1,180 becomes ₹1,000.
    • Find just the tax inside an inclusive price: =A2-A2/(1+18%). ₹1,180 contains ₹180 of tax.

    A common error is removing 18% with =A2*(1-18%). On ₹1,180 that gives ₹967.60, not ₹1,000, because 18% of the inclusive price is more than 18% of the base. The reverse-calculation is explained in removing GST from an inclusive price.

    Keep the rate in its own cell (say E1 = 18%) and use =A2*(1+$E$1). Then a rate change means editing one cell, not every formula.

    Marks and attendance percentages

    • Marks percentage: =A2/B2, where A2 is marks obtained and B2 is maximum marks. 423 out of 500 is 84.6%.
    • Average of several subject percentages: only use =AVERAGE(C2:C6) if every subject has the same maximum marks. Otherwise add all marks and divide by all maximum marks: =SUM(A2:A6)/SUM(B2:B6).
    • Attendance: =classes_attended/classes_held. For how many classes you can miss and stay above a limit, see attendance percentage.

    Showing decimals and rounding

    • Use Increase Decimal / Decrease Decimal to show 84.6% instead of 85%. This changes only the display.
    • To actually round the value, use =ROUND(A2/B2,3) for one decimal place in percent (0.846 → 84.6%), because the value is stored as a fraction.

    Common errors and fixes

    What you seeLikely causeFix
    2500% instead of 25%Multiplied by 100 and formatted as %Remove the *100
    #DIV/0!Dividing by an empty or zero cellCheck the reference or use IFERROR
    Wrong values after dragging downTotal cell reference movedLock it with $, like $B$7
    0% for small valuesToo few decimals displayedIncrease decimals
    Formula shows as textCell formatted as Text, or missing =Format as General and retype with =

    Check one result quickly

    Before trusting a whole column, check one row by hand in the percentage calculator: pick "X is what % of Y" for shares, "% change from X to Y" for growth, or "Add X% to Y" for markups. If the calculator and the spreadsheet agree on one row, the formula is right for all of them. For the maths behind each formula, see percentage formulas explained.

    Frequently asked questions

    What is the formula for percentage in Excel?

    Divide the part by the whole, for example =A2/B2, then format the cell as a percentage with the % button. 45 divided by 180 shows as 25%.

    How do I calculate percentage change in Excel?

    Use =(new-old)/old, for example =(B2-A2)/A2 with the old value in A2. From 80 to 100 it gives 25%; from 100 to 80 it gives −20%.

    Why does Excel show 2500% instead of 25%?

    The formula multiplies by 100 and the cell is also formatted as a percentage. Remove the *100, because percentage formatting already multiplies the stored value by 100 for display.

    How do I remove 18% GST from a price in Excel?

    Divide by 1.18: =A2/(1+18%). ₹1,180 becomes ₹1,000. Multiplying by (1-18%) gives the wrong answer of ₹967.60.

    Do the same percentage formulas work in Google Sheets?

    Yes. All the formulas here, including the $ references and IFERROR, work the same way in Google Sheets.

    Try this tool on Lazyblink

    Put this guide into practice with our free online tool — no signup required.

    Open tool