How to Do Subtraction in Excel: Every Method Explained (2026)
Written by the team at Iron Software
Subtraction in Excel is built around one operator: the minus sign. Unlike addition, which has its own SUM function, Excel does not have a dedicated subtract function. Subtracting in Excel is done using the minus sign (-) as an arithmetic operator rather than a purpose-built function, and that single operator handles everything from simple subtraction of two numbers to subtracting entire columns, percentages, dates, and time values. Every formula starts with an equal sign in the formula bar, includes cell references or direct numbers in excel, and press enter to display the result.
Understanding what is actually happening when excel calculates a subtraction formula makes the more advanced methods easier to follow. Whenever you want to subtract one value from other cells across a worksheet, referencing those cells directly is always more reliable than retyping numbers. Type a value into a cell, reference it in a formula, and whenever the source cell changes, every formula that references it recalculates automatically. This is what makes cell-based subtraction far more useful than typing raw numbers into every formula. If a cell in a range is blank, Excel treats it as zero when performing calculations, so empty cells in a range do not break formulas.
This guide covers every method to subtract in excel in 2026: simple subtraction with the minus sign, subtracting multiple cells, using the sum function to subtract ranges, subtracting an entire column with an absolute reference, subtracting percentages, subtracting dates to find the difference in days, subtracting time values, and handling negative numbers. Developers building .NET applications who need to apply subtraction formulas to Excel files programmatically will find a section at the end covering how IronXL handles this in C# without requiring Microsoft Office.
Method 1: Simple Subtraction Using the Minus Sign
Best for: Subtracting two numbers or two cells quickly, everyday calculations.
Simple subtraction can be performed using direct numbers or cell references. This is the starting point for every other method in this guide.
Subtracting two numbers directly:
- Click any empty cell on the worksheet.
- Type an equal sign (=) to start the formula in the formula bar.
- Type the first number, then a minus sign (-), then the second number. For example: =100-50
- Press enter. Excel calculates and displays the result (50) in the cell.
Subtracting using cell references:
- Enter your values into separate cells. For example, type 250 in cell B5 and 120 in cell C5.
- Click an empty cell where you want the result to appear.
- Type =B5-C5 in the formula bar.
- Press enter. The result (130) appears in the cell.
When working with two or more numbers across separate cells, to subtract values in different cells in excel, start by typing the equal sign (=), then click on the cell containing the starting value, type a minus sign, and click on the cell containing the subtrahend before pressing enter. Clicking cells directly rather than typing their addresses is faster and reduces the chance of typos.
If you click a cell while typing a formula, Excel inserts its address automatically. This is faster than typing the cell reference manually and eliminates spelling mistakes in cell addresses.

Method 2: Subtract Multiple Cells in a Single Formula
Best for: Subtracting three or more individual cells from a starting value.
To subtract multiple cells in Excel, you can chain the minus sign operator. When subtracting multiple cells, you can use a formula like =A1-A2-A3-A4-A5 to subtract the values in cells A2 through A5 from the value in A1.
Steps:
- Click the cell where you want the result.
- Type = followed by your first cell reference (the starting value).
- Type a minus sign, then the next cell reference.
- Repeat the minus sign and cell reference for each additional cell to subtract.
- Press enter when all cells have been added.
For example, to subtract cells B2, C2, and D2 from A2: =A2-B2-C2-D2. This formula allows you to subtract as many cells as needed in one go.
Using the SUM function for a cleaner formula:
When subtracting many cells, chaining minus signs becomes unwieldy. Using the SUM function can simplify the subtraction of multiple cells. For example, =A1-SUM(A2:A5) subtracts the sum of cells A2 to A5 from the value in A1.
You can use the SUM() function to subtract a range of cells from a single cell by writing a formula like =A1-SUM(A2:A5), which adds up the values in A2 to A5 and subtracts that sum from A1. Another method to subtract multiple cells is to place the subtracted values as negative arguments inside SUM itself. In excel, subtracting a positive number is equivalent to adding a negative number, as in the formula =SUM(100, -20, -10) which results in 70. This means you can subtract multiple numbers at once by listing all the numbers as arguments with a negative sign, avoiding the need for a plus sign or chained minus operators. This means =SUM(A1,-A2,-A3,-A4,-A5) produces the same result as =A1-A2-A3-A4-A5.
You can also subtract a range of cells from a single cell by typing a formula like =E1-E3-E4-E5-E6-E7, or simply =E1-SUM(E3:E7) to make it more efficient.
Using the SUM function approach is generally preferred for subtracting many cells because it clearly separates the starting value from the values being subtracted and is easier to audit at a glance.

Method 3: Subtract an Entire Column Using Absolute Reference
Best for: Applying the same fixed deduction to every row in a column, such as a standard tax, discount, or fee.
When you need to subtract a fixed value from every cell in a column, an absolute reference locks one cell address so it does not shift when you drag the formula down the column.
To subtract a specific value from an entire column in Excel, you can use an absolute reference in your formula, such as =A2-$B$2, which keeps the reference fixed when dragging the formula down the column. When dragging a formula down a column in Excel, absolute references prevent the reference from shifting.
Steps:
- Place your fixed deduction value in a single cell, for example $250 in cell C17.
- In the first result cell, type =B17-$C$17. The dollar signs before both the column letter and row number create an absolute reference.
- Press enter to confirm the formula.
- Click the result cell again, then drag the fill handle (the small square at the bottom-right corner of the cell) downward to copy the formula to all rows below.
Every row calculates its own value in column B minus the same fixed value in C17. If you later change the value in C17, every formula in the column updates simultaneously.
Use F4 immediately after clicking a cell reference while typing a formula to cycle through absolute and relative reference types. Pressing F4 once adds both $ signs (absolute), twice locks only the row, three times locks only the column.
Method 4: Subtract Two Columns (Column vs Column)
Knowing how to subtract columns is essential when comparing data across multiple columns, such as budget versus actual figures or sales targets against results.
To subtract one entire column from another, enter a formula in the first result cell and drag it down.
- In the result cell for the first row (for example D3), type =B3-C3.
- Press enter.
- Click D3 again and drag the fill handle down through all rows that contain data.
Excel copies the formula to every row, adjusting the row numbers automatically (D4 becomes =B4-C4, D5 becomes =B5-C5, and so on). This is called a relative reference and is the default behaviour when cell addresses do not include dollar signs.
To subtract one entire column from another, the SUM function can also be used in combination with the minus sign for faster calculation when you want a single total: =SUM(B3:B14)-SUM(C3:C14) gives the total variance across all rows in a single cell.
Method 5: Subtract Percentages
Best for: Calculating discounted prices, tax deductions, or any reduction expressed as a percentage.
To subtract percentages in Excel, the formula syntax is =Number-(Number percentage). For example, to subtract 10% from 100, you would use the formula =100-(10010%).
You can also use cell references in the formula, such as =A2-(A2*$B$2), where A2 contains the number and B2 contains the percentage. This approach allows you to change the discount or tax rate in one cell and have every row recalculate automatically.
Steps:
- Enter the original value in one cell, for example 1200 in cell B4.
- Enter the percentage in another cell, for example 0.10 (formatted as 10%) in cell C4.
- In the result cell, type =B4-(B4*C4).
- Press enter. Excel calculates 1200 minus 10% of 1200 (120) and displays 1080. The multiplication inside the parentheses runs first, then the subtraction is applied to the result.
If the percentage is stored in a fixed reference cell, use an absolute reference to lock it: =B4-(B4*$C$4). Drag this formula down the column to apply the same percentage deduction to multiple values while keeping the percentage cell fixed.

Make sure the percentage cell is formatted as a percentage (not as a plain number). If B4 contains 10 rather than 10%, the formula =A2-(A2*B4) would subtract 1,000% rather than 10%.
Method 6: Subtract Dates to Find the Difference in Days
Best for: Calculating project durations, contract lengths, invoice aging, or days elapsed between two events.
To subtract dates in Excel, you can use the formula =End_Date - Start_Date, which gives you the number of days between the two dates. Excel stores date values as serial numbers, starting with 1 for the year 1900, which is why subtracting dates works exactly like subtracting numbers.
Steps:
- Enter the start date in one cell, for example 05-Jan-2026 in cell B11.
- Enter the end date in another cell, for example 30-Apr-2026 in cell C11.
- In the result cell, type =C11-B11.
- Press enter.
If the result of a date subtraction appears as a strange number or another date instead of a plain day count, changing the cell format to General or Number will display the correct number of days. Right-click the result cell, choose Format Cells, select General or Number, and click OK.

Method 7: Subtract Time Values
Best for: Calculating hours worked, meeting durations, or elapsed time between two timestamps.
To subtract time values in Excel, use the formula =End_time - Start_time, ensuring the result cell is formatted to display time correctly.
Steps:
- Enter the start time in one cell, for example 9:00 AM in cell B18.
- Enter the end time in another cell, for example 5:30 PM in cell C18.
- In the result cell, type =C18-B18.
- Press enter.
When subtracting time in Excel, format the result cell as Time or use a custom format like [h]:mm to display the hours correctly. The square brackets around h in [h]:mm allow hours to exceed 24, which is important for cumulative time totals.
To find the elapsed time between two time values in Excel, enter the start time in one cell and the end time in another, then use the formula =End_time - Start_time. For the work shift example in the demo file, 9:00 AM to 5:30 PM produces a result of 8:30 (eight hours and thirty minutes).
For overnight shifts where the end time is earlier than the start time (for example 10:00 PM to 6:00 AM), use the formula =1+C20-B20 to account for the date crossing midnight. Without the +1, Excel returns a negative time value that displays as hashes (######).
Method 8: Subtract Negative Numbers
Best for: Understanding how negative numbers interact with subtraction formulas.
Negative numbers in subtraction behave exactly as they do in standard arithmetic. Subtracting a negative number produces an addition result.
- =10-(-5) returns 15 (subtracting negative 5 is the same as adding 5)
- =A1-B1 where B1 contains -50 and A1 contains 100 returns 150
When working with negative numbers in reports or financial data, the minus sign operator handles them correctly without any special syntax. The negative sign on the value is part of the value itself, not the formula operator.
If you need to display negative numbers in a specific format, right-click the cell, choose Format Cells, and select a number format that uses parentheses for negatives or a red font, both of which are available under the Number category in the cell format dialog.
For users working with grid-based data, it is possible to subtract matrices in Excel using an array formula. To subtract two matrices of the same dimensions, select the result range, type =A2:C4-E2:G4, and press Ctrl + Shift + Enter (or just Enter in Microsoft 365). Excel applies the subtraction element by element across both matrices simultaneously.
Common Issues and Troubleshooting
The formula displays text instead of a number
This happens when the cell is formatted as Text before you type the formula. The equal sign is treated as a literal character rather than a formula trigger. Click the cell, go to Home > Number format dropdown and change it to General, then re-enter the formula.
Date subtraction shows a date or a decimal instead of a number of days
If the result of a date subtraction appears as a date (for example 14-Jan-1900) or as a decimal, the result cell is formatted as Date or Time rather than Number. Right-click the result cell, choose Format Cells, select General, and click OK to display the correct day count.
The formula result does not update when source cells change
Excel may be set to manual calculation mode. Press Ctrl + Alt + F9 to force a full recalculation, or go to Formulas > Calculation Options > Automatic to return to the default setting where excel calculates results automatically on every change.
Dragging the formula changes a reference that should stay fixed
A cell reference without dollar signs (like C17) becomes relative and shifts as the formula is dragged. To lock it, click on the reference in the formula bar and press F4 to add dollar signs and make it an absolute reference ($C$17). If a spreadsheet already uses the formula, find and replace the reference throughout the column.
The result shows #VALUE! after subtracting
This error usually means one of the cells being subtracted contains text rather than a number. Check each cell referenced in the formula. Common causes include spaces before numbers, text-formatted numbers imported from another system, or dates stored as text strings rather than actual date values.
Subtracting times gives a result of zero or ######
Zero typically means the start and end times are in the same cell formatted differently. ###### usually means the result is negative (for example an overnight shift where no +1 adjustment was made) or the column is too narrow to display the value. Widen the column or use the [h]:mm custom format to resolve display issues.
Quick Reference: Subtraction Methods in Excel
The table below covers every instance of subtraction covered in this guide, with the formula pattern and key notes for each.
| Goal | Formula Example | Notes |
|---|---|---|
| Subtract two numbers directly | =100-50 | Simple subtraction, no cell refs needed |
| Subtract two cells | =A1-B1 | Updates automatically when values change |
| Subtract multiple cells | =A1-B1-C1-D1 | Chain minus signs for each cell |
| Subtract a range using SUM | =A1-SUM(B1:E1) | Cleaner than chaining many minus signs |
| Subtract with negative SUM args | =SUM(A1,-B1,-C1) | Subtracting is adding a negative number |
| Subtract an entire column | =B2-$C$2 then drag down | Absolute ref keeps deduction fixed |
| Subtract two full columns | =B3-C3 then drag down | Relative ref shifts automatically per row |
| Subtract a percentage | =A2-(A2*10%) | Parentheses control calculation order |
| Subtract dates | =C11-B11 | Format result as Number to see days |
| Subtract time values | =C18-B18 | Format result as [h]:mm for hours |
| Subtract across columns with total | =SUM(B2:B14)-SUM(C2:C14) | Single variance total for two columns |
For Developers: Apply Subtraction Formulas in Excel Files with IronXL
If your .NET application generates Excel reports, financial summaries, or data exports that include subtraction calculations, IronXL lets you write these formulas directly into cells using C# without requiring Microsoft Office installed on the server.
IronXL supports over 165 Excel formulas, and subtraction formulas are set by assigning a formula string to the Formula property of any cell. The formula string uses standard Excel syntax, so the same formula you would type into Excel works identically when set through IronXL. After setting formulas, calling workBook.EvaluateAll() forces recalculation so every formula result is current before the file is saved.
Here is a practical example that creates a budget variance report, applies cell-to-cell subtraction across two columns, and uses the SUM function to calculate totals:
using IronXL;
WorkBook workBook = WorkBook.Create(ExcelFileFormat.XLSX);
WorkSheet ws = workBook.DefaultWorkSheet;
ws.Name = "Budget Variance";
// Column headers
ws["A1"].Value = "Department";
ws["B1"].Value = "Budget";
ws["C1"].Value = "Actual";
ws["D1"].Value = "Variance";
// Sample data rows
string[] depts = { "Engineering", "Marketing", "Sales", "HR", "Operations" };
int[] budgets = { 480000, 220000, 310000, 95000, 260000 };
int[] actuals = { 512000, 198000, 327000, 88000, 241000 };
for (int i = 0; i < depts.Length; i++)
{
int row = i + 2;
ws[$"A{row}"].Value = depts[i];
ws[$"B{row}"].Value = budgets[i];
ws[$"C{row}"].Value = actuals[i];
// Subtract Actual from Budget to get Variance
// Standard Excel subtraction formula - no SUBTRACT function exists
ws[$"D{row}"].Formula = $"=B{row}-C{row}";
}
// Total row using SUM-based subtraction
int totalRow = depts.Length + 2;
ws[$"A{totalRow}"].Value = "Total";
ws[$"B{totalRow}"].Formula = $"=SUM(B2:B{totalRow - 1})";
ws[$"C{totalRow}"].Formula = $"=SUM(C2:C{totalRow - 1})";
// Total variance: subtract sum of actuals from sum of budgets
ws[$"D{totalRow}"].Formula = $"=B{totalRow}-C{totalRow}";
// Recalculate all formulas before saving
workBook.EvaluateAll();
workBook.SaveAs("budget-variance-report.xlsx");
using IronXL;
WorkBook workBook = WorkBook.Create(ExcelFileFormat.XLSX);
WorkSheet ws = workBook.DefaultWorkSheet;
ws.Name = "Budget Variance";
// Column headers
ws["A1"].Value = "Department";
ws["B1"].Value = "Budget";
ws["C1"].Value = "Actual";
ws["D1"].Value = "Variance";
// Sample data rows
string[] depts = { "Engineering", "Marketing", "Sales", "HR", "Operations" };
int[] budgets = { 480000, 220000, 310000, 95000, 260000 };
int[] actuals = { 512000, 198000, 327000, 88000, 241000 };
for (int i = 0; i < depts.Length; i++)
{
int row = i + 2;
ws[$"A{row}"].Value = depts[i];
ws[$"B{row}"].Value = budgets[i];
ws[$"C{row}"].Value = actuals[i];
// Subtract Actual from Budget to get Variance
// Standard Excel subtraction formula - no SUBTRACT function exists
ws[$"D{row}"].Formula = $"=B{row}-C{row}";
}
// Total row using SUM-based subtraction
int totalRow = depts.Length + 2;
ws[$"A{totalRow}"].Value = "Total";
ws[$"B{totalRow}"].Formula = $"=SUM(B2:B{totalRow - 1})";
ws[$"C{totalRow}"].Formula = $"=SUM(C2:C{totalRow - 1})";
// Total variance: subtract sum of actuals from sum of budgets
ws[$"D{totalRow}"].Formula = $"=B{totalRow}-C{totalRow}";
// Recalculate all formulas before saving
workBook.EvaluateAll();
workBook.SaveAs("budget-variance-report.xlsx");
Imports IronXL
Dim workBook As WorkBook = WorkBook.Create(ExcelFileFormat.XLSX)
Dim ws As WorkSheet = workBook.DefaultWorkSheet
ws.Name = "Budget Variance"
' Column headers
ws("A1").Value = "Department"
ws("B1").Value = "Budget"
ws("C1").Value = "Actual"
ws("D1").Value = "Variance"
' Sample data rows
Dim depts As String() = {"Engineering", "Marketing", "Sales", "HR", "Operations"}
Dim budgets As Integer() = {480000, 220000, 310000, 95000, 260000}
Dim actuals As Integer() = {512000, 198000, 327000, 88000, 241000}
For i As Integer = 0 To depts.Length - 1
Dim row As Integer = i + 2
ws($"A{row}").Value = depts(i)
ws($"B{row}").Value = budgets(i)
ws($"C{row}").Value = actuals(i)
' Subtract Actual from Budget to get Variance
' Standard Excel subtraction formula - no SUBTRACT function exists
ws($"D{row}").Formula = $"=B{row}-C{row}"
Next
' Total row using SUM-based subtraction
Dim totalRow As Integer = depts.Length + 2
ws($"A{totalRow}").Value = "Total"
ws($"B{totalRow}").Formula = $"=SUM(B2:B{totalRow - 1})"
ws($"C{totalRow}").Formula = $"=SUM(C2:C{totalRow - 1})"
' Total variance: subtract sum of actuals from sum of budgets
ws($"D{totalRow}").Formula = $"=B{totalRow}-C{totalRow}"
' Recalculate all formulas before saving
workBook.EvaluateAll()
workBook.SaveAs("budget-variance-report.xlsx")
To apply a fixed deduction using an absolute reference pattern, write the formula string with the $ notation exactly as you would in Excel:
using IronXL;
WorkBook workBook = WorkBook.Load("payroll.xlsx");
WorkSheet ws = workBook.DefaultWorkSheet;
// Fixed tax deduction is stored in cell C1
ws["C1"].Value = 250;
// Apply =B2-$C$1 to rows 2 through 20 (absolute reference to C1)
for (int row = 2; row <= 20; row++)
{
ws[$"D{row}"].Formula = $"=B{row}-$C$1";
}
workBook.EvaluateAll();
workBook.SaveAs("payroll-net-pay.xlsx");
using IronXL;
WorkBook workBook = WorkBook.Load("payroll.xlsx");
WorkSheet ws = workBook.DefaultWorkSheet;
// Fixed tax deduction is stored in cell C1
ws["C1"].Value = 250;
// Apply =B2-$C$1 to rows 2 through 20 (absolute reference to C1)
for (int row = 2; row <= 20; row++)
{
ws[$"D{row}"].Formula = $"=B{row}-$C$1";
}
workBook.EvaluateAll();
workBook.SaveAs("payroll-net-pay.xlsx");
Imports IronXL
Dim workBook As WorkBook = WorkBook.Load("payroll.xlsx")
Dim ws As WorkSheet = workBook.DefaultWorkSheet
' Fixed tax deduction is stored in cell C1
ws("C1").Value = 250
' Apply =B2-$C$1 to rows 2 through 20 (absolute reference to C1)
For row As Integer = 2 To 20
ws($"D{row}").Formula = $"=B{row}-$C$1"
Next
workBook.EvaluateAll()
workBook.SaveAs("payroll-net-pay.xlsx")
IronXL runs on .NET 6 and later, and is fully compatible with Windows, Linux, macOS, Docker, and Azure. Because it writes directly to the Open XML format without launching Excel, it is fast and suitable for high-volume server-side report generation. The Excel formulas in C# guide and the edit Excel formulas how-to page cover the full range of formula operations available.
Getting started: Install via NuGet with Install-Package IronXL.Excel. A free trial is available with 30 days of full functionality and no credit card required.
Further reading:
Wrapping Up
Every subtraction task in Microsoft Excel comes back to the same operator: the minus sign. From typing =A1-B1 for a quick two-cell difference to using =A1-SUM(B1:E1) for cleaner multi-cell formulas, the pattern is consistent regardless of how many cells or how many columns are involved. Absolute references with dollar signs keep fixed values locked when dragging formulas across rows, and the same minus operator works seamlessly for percentages, dates, and time values once the result cells are formatted correctly.
For percentage subtraction, the formula =Number-(Number * percentage) handles any rate. For dates, =End_Date-Start_Date returns the number of days directly, as long as the result cell is formatted as a Number rather than a Date. For time, =End_time-Start_time with a [h]:mm format gives accurate elapsed time including cases where hours exceed 24. In every scenario, remember that Excel does not have a dedicated subtract function: subtraction is always the minus sign, and negative numbers in the source data behave exactly as expected.
Developers generating Excel files in .NET applications can replicate every one of these patterns with IronXL, setting subtraction formulas through the Formula property and calling EvaluateAll() to ensure all results are current before saving. Start with a free trial to explore the full formula support in your own project environment.




