Bookmarks    
nPr and nCr    
Random Number    
SD Calculator    
Sample Size    
Percent Error    
Density    
Molarity    
Molar Mass    
Ohm's Law    
Watts to Amps    
Voltage Drop    
Long Division    
Mixed Numbers    
Rounding    
Nth Root    
Exponents    
Half-Life    
Polar Form    
De Moivre    
3D Distance    
Point to Line    
Cross Product    
Determinant    
Sin Cos Tan    
Triangle Area    
Scale Factor    
Sector Area    
Ellipse Area    
Cube Volume    
Box Volume    
Sphere Volume    
Cone Volume    
Pipe Volume    
Time Duration    
Time Card    
Present Value    
Future Value    
Churn Rate    
A/B Test Calc    
SEO Traffic    
Ideal Weight    
Fat Intake    
Child Height    
Golf Handicap    
Heat Index    
Wind Chill    
Dew Point    
Download Time    
kWh to Cost    
AC Size (BTU)    
Heating Costs    
LED Savings    
Trip Gas Cost    
Tire Size    
Solar Output    
Solar Payback    
Battery Size    
Wall Area    
Gravel Needed    
Mortar Mix    
Slope Grade    
Curtain Size    
Soil Needed    
Sod Needed    
Ramp Length    
Blind Size    
Drain Slope    
Board Feet    
Heat Loss    
Furniture Fit    
Moving Boxes    
Plywood Cuts    
Shelf Sag    
   Add
Probability and random number calculators
Independent Events
Independent Events
Two Events Solver
Two Events Solver
Repeated Trials
Repeated Trials
Bayes' Theorem
Bayes' Theorem
Expected Value
Expected Value
Binomial Distribution
Binomial Distribution
nPr and nCr
nPr and nCr
Circular Permutation
Circular Permutation
With Repetition
With Repetition
Random Number
Random Number
Averages and statistics calculators
Average Calculator
Average Calculator
Mean Median Mode
Mean Median Mode
SD Calculator
SD Calculator
Quartiles & IQR
Quartiles & IQR
Frequency Table
Frequency Table
Correlation (r)
Correlation (r)
Normal Probability
Normal Probability
Z-Score Calculator
Z-Score Calculator
Confidence Interval
Confidence Interval
Sample Size
Sample Size
Mark & Recapture
Mark & Recapture
P-Value Calculator
P-Value Calculator
Percentage and ratio calculators
Percentage Calc
Percentage Calc
Percent Change
Percent Change
Percent Difference
Percent Difference
Percent Error
Percent Error
Ratio Calculator
Ratio Calculator
Discount Calculator
Discount Calculator
Sales Tax Calculator
Sales Tax Calculator
Margin Calculator
Margin Calculator
Speed calculators
Speed Calculator
Speed Calculator
Density and concentration calculators
Density
Density
Molarity
Molarity
Molar Mass
Molar Mass
Physics and electricity calculators
Ohm's Law
Ohm's Law
Watts to Amps
Watts to Amps
Resistor Colors
Resistor Colors
Voltage Drop
Voltage Drop
Unit conversion calculators
Weight Converter
Weight Converter
Shoe Size Converter
Shoe Size Converter
Integer and signed number calculators
Long Division
Long Division
LCM Calculator
LCM Calculator
GCF Calculator
GCF Calculator
Integer Calculator
Integer Calculator
Prime Factorization
Prime Factorization
Diophantine Solver
Diophantine Solver
Modulo Calculator
Modulo Calculator
Factor Calculator
Factor Calculator
Roman Numerals
Roman Numerals
Fraction, decimal and rounding calculators
Fraction Calculator
Fraction Calculator
Mixed Numbers
Mixed Numbers
Simplify Fractions
Simplify Fractions
Fraction to Decimal
Fraction to Decimal
Decimal to Fraction
Decimal to Fraction
Rounding
Rounding
Equation and inequality calculators
Linear Equation
Linear Equation
Linear Systems
Linear Systems
Quadratic Formula
Quadratic Formula
Absolute Value
Absolute Value
Quadratic Inequality
Quadratic Inequality
Polynomial calculators
Binomial Theorem
Binomial Theorem
Square root and nth root calculators
Simplify Radicals
Simplify Radicals
Nth Root
Nth Root
Exponent and logarithm calculators
Exponents
Exponents
Log Calculator
Log Calculator
Number of Digits
Number of Digits
Scientific Notation
Scientific Notation
Sci. Notation Math
Sci. Notation Math
Half-Life
Half-Life
Complex number calculators
Complex Numbers
Complex Numbers
Polar Form
Polar Form
De Moivre
De Moivre
Function and graph calculators
Slope Calculator
Slope Calculator
Linear Function
Linear Function
Direct & Inverse Variation
Direct & Inverse Variation
y = ax² Calculator
y = ax² Calculator
Distance Formula
Distance Formula
3D Distance
3D Distance
Section Formula
Section Formula
Point to Line
Point to Line
Lat/Long Distance
Lat/Long Distance
Complete the Square
Complete the Square
Circle Equation
Circle Equation
Conic Sections
Conic Sections
Polar Coordinates
Polar Coordinates
Sequence calculators
Arithmetic Sequence
Arithmetic Sequence
Geometric Sequence
Geometric Sequence
Fibonacci Sequence
Fibonacci Sequence
Recurrence Relation
Recurrence Relation
Vector calculators
Vector Calculator
Vector Calculator
Cross Product
Cross Product
Matrix calculators
Matrix Calculator
Matrix Calculator
Determinant
Determinant
Inverse Matrix
Inverse Matrix
Plane geometry calculators
Sin Cos Tan
Sin Cos Tan
Degrees ⇔ Radians
Degrees ⇔ Radians
a sin θ + b cos θ
a sin θ + b cos θ
Triangle Solver
Triangle Solver
Triangle Area
Triangle Area
Right Triangle
Right Triangle
Pythagorean Theorem
Pythagorean Theorem
Polygon Angles
Polygon Angles
Scale Factor
Scale Factor
Parallel Lines
Parallel Lines
Rectangle Area
Rectangle Area
Parallelogram Area
Parallelogram Area
Trapezoid Area
Trapezoid Area
Circle Calculator
Circle Calculator
Sector Area
Sector Area
Inscribed Angle
Inscribed Angle
Ellipse Area
Ellipse Area
Solid geometry calculators
Cube Volume
Cube Volume
Cube Surface Area
Cube Surface Area
Box Volume
Box Volume
Box Surface Area
Box Surface Area
Cylinder Volume
Cylinder Volume
Cylinder Surface
Cylinder Surface
Sphere Volume
Sphere Volume
Sphere Surface
Sphere Surface
Spherical Cap Volume
Spherical Cap Volume
Cap Surface Area
Cap Surface Area
Ellipsoid Volume
Ellipsoid Volume
Ellipsoid Surface
Ellipsoid Surface
Pyramid Volume
Pyramid Volume
Pyramid Surface
Pyramid Surface
Cone Volume
Cone Volume
Cone Surface Area
Cone Surface Area
Frustum Volume
Frustum Volume
Frustum Surface Area
Frustum Surface Area
Pipe Volume
Pipe Volume
Capsule Volume
Capsule Volume
Capsule Surface Area
Capsule Surface Area
Date and time calculators
Age Calculator
Age Calculator
Days Between Dates
Days Between Dates
Date Calculator
Date Calculator
Hours From Now
Hours From Now
Day of the Week
Day of the Week
Time Calculator
Time Calculator
Time Zone Converter
Time Zone Converter
Hours Calculator
Hours Calculator
Time Duration
Time Duration
Time Card
Time Card
Finance and economics calculators
Compound Interest
Compound Interest
Simple Interest
Simple Interest
Interest Calculator
Interest Calculator
TVM Calculator
TVM Calculator
Present Value
Present Value
Future Value
Future Value
ROI Calculator
ROI Calculator
IRR Calculator
IRR Calculator
Payback Period
Payback Period
Average Return
Average Return
GDP Calculator
GDP Calculator
Web marketing and ad metric calculators
CTR Calculator
CTR Calculator
Conversion Rate
Conversion Rate
CPC, CPM & CPA
CPC, CPM & CPA
ROAS Calculator
ROAS Calculator
Break-Even CPA
Break-Even CPA
LTV Calculator
LTV Calculator
CAC Calculator
CAC Calculator
Churn Rate
Churn Rate
A/B Test Calc
A/B Test Calc
A/B Sample Size
A/B Sample Size
SEO Traffic
SEO Traffic
Break-Even Point
Break-Even Point
Markup vs. Margin
Markup vs. Margin
CAGR Calculator
CAGR Calculator
Health and fitness calculators
BMI Calculator
BMI Calculator
Sleep Calculator
Sleep Calculator
Calorie Calculator
Calorie Calculator
BMR Calculator
BMR Calculator
TDEE Calculator
TDEE Calculator
Ideal Weight
Ideal Weight
Body Fat Calculator
Body Fat Calculator
Lean Body Mass
Lean Body Mass
Calories Burned
Calories Burned
Protein Intake
Protein Intake
Macro Calculator
Macro Calculator
Carb Calculator
Carb Calculator
Fat Intake
Fat Intake
Child Height
Child Height
Sports calculators
Golf Handicap
Golf Handicap
Pace Calculator
Pace Calculator
1RM Calculator
1RM Calculator
Target Heart Rate
Target Heart Rate
Weather calculators
Heat Index
Heat Index
Wind Chill
Wind Chill
Dew Point
Dew Point
Computer calculators
Base Converter
Base Converter
Subnet Calculator
Subnet Calculator
Download Time
Download Time
Household energy and budget calculators
Electricity Cost
Electricity Cost
kWh to Cost
kWh to Cost
Yearly kWh to Cost
Yearly kWh to Cost
AC Size (BTU)
AC Size (BTU)
AC Running Cost
AC Running Cost
Heating Costs
Heating Costs
Gas vs Electric
Gas vs Electric
LED Savings
LED Savings
Salary Calculator
Salary Calculator
Budget Calculator
Budget Calculator
Car calculators
Trip Gas Cost
Trip Gas Cost
EV Charging Cost
EV Charging Cost
EV vs Gas Cost
EV vs Gas Cost
MPG Calculator
MPG Calculator
Tire Size
Tire Size
Solar power and battery calculators
Solar Output
Solar Output
Solar Panel Count
Solar Panel Count
Solar Payback
Solar Payback
Battery Size
Battery Size
Home and DIY calculators
Tile Calculator
Tile Calculator
Stair Calculator
Stair Calculator
Concrete Volume
Concrete Volume
Wall Area
Wall Area
Wallpaper Rolls
Wallpaper Rolls
Paint Calculator
Paint Calculator
Flooring Needed
Flooring Needed
Exterior Walls
Exterior Walls
Gravel Needed
Gravel Needed
Mortar Mix
Mortar Mix
Slope Grade
Slope Grade
Lumber Cut List
Lumber Cut List
Lot Coverage/FAR
Lot Coverage/FAR
Sheet Vinyl Roll
Sheet Vinyl Roll
Insulation Needed
Insulation Needed
Curtain Size
Curtain Size
TV Size & Distance
TV Size & Distance
Soil Needed
Soil Needed
Sod Needed
Sod Needed
Block Calculator
Block Calculator
Brick Calculator
Brick Calculator
Deck Materials
Deck Materials
Ramp Length
Ramp Length
Pilot Hole Size
Pilot Hole Size
Room Ventilation
Room Ventilation
Paint Thinning
Paint Thinning
Baseboard & Trim
Baseboard & Trim
Blind Size
Blind Size
Picture Hanging
Picture Hanging
Drain Slope
Drain Slope
Screw Calculator
Screw Calculator
Board Feet
Board Feet
Fence Calculator
Fence Calculator
Wood Shrinkage
Wood Shrinkage
Caulk Calculator
Caulk Calculator
Heat Loss
Heat Loss
Furniture Fit
Furniture Fit
Moving Boxes
Moving Boxes
Storage Capacity
Storage Capacity
Plywood Cuts
Plywood Cuts
Shelf Sag
Shelf Sag

Positive and Negative Numbers Calculator (Integer Rules, Steps and Number Line)

Enter the expression you want to calculate. You can use integers, decimals, fractions (written as a division, like 1/2), parentheses and powers (^2 or ²). For expressions with only addition and subtraction, the moves to the answer are also shown on a number line.

You can type × and ÷ as * and /. A fraction such as 1/2 is the same as 1÷2. When a division does not come out even, the answer is shown exactly as a fraction in simplest form, without rounding. The × for multiplication cannot be left out.
Result and graph
Enter an expression in the field on the left and press "Calculate". The result appears here with every step (and a number line for expressions with only addition and subtraction).

What you can do on this page

  • Enter an expression with positive and negative numbers, such as -3+5-(-2), and get not just the answer but every step, in the order taught in school
  • Each step explains in plain words which sign rule was used: "subtracting is adding the opposite", "same signs give +, different signs give −" when removing parentheses, and "an even number of negatives gives +, an odd number gives −" for multiplying and dividing
  • For expressions with only addition and subtraction, you can also follow the calculation as arrows moving along a number line (+ to the right, − to the left)
  • Integers, decimals, fractions (entered as a division, like 1/2), nested parentheses and powers (^2 or ²) all work. It also handles the easy-to-miss difference between \((-2)^2\) and \(-2^2\)
  • When a division does not come out even, the answer is shown as an exact fraction in simplest form, not a rounded decimal. A plain-language explanation of the formulas and copy-and-paste formulas for Excel, Google Sheets and Python are all on this page
This page handles expressions with numbers only. To simplify expressions with a variable such as x, use the "Simplify Expressions Calculator" page.

What is this calculation used for?

Temperature changes (weather and daily life)

A winter forecast of "a low of −5°F" is one of the most familiar negative numbers. If the temperature rises from −5°F in the morning to 3°F at noon, the rise is 3 − (−5) = 8°F, which is exactly "subtracting a negative number".
The difference between the high and the low, or between today and yesterday, is found with the same subtraction, and "5 degrees colder than yesterday" is the same as adding −5.

Adding up income and spending (gains and losses)

If you write income as + and spending as −, a month's balance is the sum of positive and negative numbers. For example, +$4,000 (paycheck), −$2,800 (living costs) and −$700 (other bills) give 4000 − 2800 − 700 = +$500, a gain.
Company accounts and a store's books work the same way. Adding up totals that include losses (negative numbers) correctly is a basic skill for managing money.

Differences in elevation (geography and hiking)

With sea level as 0, heights above sea level are + and depths below it are −. In California, the top of Mount Whitney is at 14,505 ft and Badwater Basin in Death Valley is at −282 ft. The difference in height is 14505 − (−282) = 14,787 ft, found in one step by subtracting a negative number.
Elevations on maps and depths on nautical charts use this same system, and positive and negative numbers are essential for differences that cross the reference level (sea level).

Time zone differences (travel and working across time zones)

Time zones are written as offsets from a standard time (UTC) with positive and negative numbers, such as −5 for New York and −8 for Los Angeles in winter. The time difference between them is (−5) − (−8) = 3 hours, which is subtraction of a negative number.
Scheduling a call across time zones or working out a flight's arrival time both rely on this subtraction with signed numbers.

Sports scores and point differentials (golf, soccer and more)

In golf, the score is written relative to par, such as −3 (3 under) or +2 (2 over), and the total is the sum of positive and negative numbers from each hole. The difference between a player at −3 and a player at +2 is (−3) − (+2) = −5, so the first player leads by 5 strokes.
The goal difference in soccer and the point differential in basketball are also signed numbers (points scored minus points allowed), and they are actually used to break ties in the standings.

Formulas and number line

Adding two numbers with the same sign
On the number line
Standard notation (the usual math form)
\((-a)\) \(+\) \((-b)\) \(=\) \(-(a+b)\)
In words (symbols replaced with words)
① \(-a\): negative number \(+\) ② \(-b\): negative number \(=\) ③ \(-(a+b)\): sum of the absolute values with the common sign
The formula in words
① Adding the \(-a\): negative number
② and the \(-b\): negative number (two numbers with the same sign) gives
③ the sum of the absolute values \(a+b\) with the common sign (−)
Quick example
For \((-3) + (-4)\), the sum of the absolute values is 3 + 4 = 7 and the common sign is −, so
negative number (−3) \(+\) negative number (−4) \(=\) answer −7
\((-3) + (-4) = -(3 + 4) = -7\)
Key idea
Adding two numbers with the same sign (+ and +, or − and −) takes just one rule: add the absolute values (the sizes of the numbers without their signs) and keep the common sign. For two positives, it is ordinary addition. For two negatives, think of "a $30 debt plus a $40 debt is a $70 debt": both move in the same direction and add up.
Adding two numbers with different signs
On the number line
Standard notation (the usual math form)
\((-a)\) \(+\) \(b\) \(=\) \(+(b-a)\)
In words (symbols replaced with words)
① \(-a\): negative number \(+\) ② \(b\): positive number \(=\) ③ \(+(b-a)\): difference of the absolute values with the sign of the larger one
The formula in words
① Adding the \(-a\): negative number
② and the \(b\): positive number (two numbers with different signs) gives
③ the difference of the absolute values \(b-a\) with the sign of the number with the larger absolute value (this form of the formula is for the case \(0 < a < b\), where \(b\) has the larger absolute value)
Quick example
For \((-3) + 5\), the difference of the absolute values is 5 − 3 = 2, and the number with the larger absolute value (5) is +, so
negative number (−3) \(+\) positive number (+5) \(=\) answer +2
\((-3) + 5 = +(5 - 3) = 2\)
Key idea
Adding two numbers with different signs (+ and −) is like a tug-of-war. −3 pulls 3 to the left and +5 pulls 5 to the right, so the stronger side (the larger absolute value) wins, and the result moves toward the winner by the difference. That is why the rule is "take the difference of the absolute values and use the sign of the number with the larger absolute value". Two numbers with different signs and the same absolute value (such as −5 and +5) balance each other and add up to 0.
Subtracting is adding the opposite
Standard notation (the usual math form)
\(a\) \(-\) \((-b)\) \(=\) \(a\) \(+\) \(b\)
In words (symbols replaced with words)
① \(a\): number \(-\) ② \(-b\): negative number \(=\) \(a\): number \(+\) ③ \(+b\): the opposite
The formula in words
① Subtracting from the \(a\): number
② the \(-b\): negative number is the same as adding
③ its \(+b\): opposite (the number with the sign changed) (the − in front of the parentheses and the − inside are the same sign, so removing the parentheses gives +)
Quick example
\(8 - (-5)\) becomes adding +5, the opposite of −5, so
number 8 \(-\) negative number (−5) \(=\) number 8 \(+\) the opposite +5
\(8 - (-5) = 8 + 5 = 13\)
Key idea
Every subtraction can be rewritten as adding the opposite (\(a - b = a + (-b)\)). Many US classrooms remember this as "Keep, Change, Change": keep the first number, change − to +, change the sign of the second number. Once rewritten, the expression is just a list of terms to add, and the two addition rules above take you all the way to the answer. There are four patterns for the sign when you remove parentheses, summed up as "same signs give +, different signs give −". \(+(+b) = +b\), \(+(-b) = -b\), \(-(+b) = -b\), \(-(-b) = +b\) A common way to picture "subtracting a negative gives a positive": if someone takes away (subtracts) a debt (a negative), you end up with more.
Sign rules for multiplication and division
Standard notation (the usual math form)
\((-a)\) \(\times\) \((-b)\) \(=\) \(+ab\)
In words (symbols replaced with words)
① \(-a\): negative number \(\times\) ② \(-b\): negative number \(=\) ③ \(+ab\): product of the absolute values with +
The formula in words
① Multiplying the \(-a\): negative number
② by the \(-b\): negative number gives, because there are two negatives (an even number),
③ the product of the absolute values \(ab\) with +
Quick example
\((-2) \times (-3)\) has two negatives (an even number), so the sign is +, and the product of the absolute values is 2 × 3 = 6, so
negative number (−2) \(\times\) negative number (−3) \(=\) answer +6
\((-2) \times (-3) = +(2 \times 3) = 6\)
Key idea
The sign of a product or quotient depends only on how many negative numbers are multiplied or divided. An even number of negatives (0, 2, 4, …) gives +, and an odd number (1, 3, …) gives −. Division follows the same rule (example - \(6 \div (-2) = -3\)). One way to see why "− × − = +": the opposite of the opposite is the original. Multiplying by −1 flips the direction on the number line, so flipping twice brings you back to the original direction. Once the sign is decided, all that is left is ordinary multiplication or division of the absolute values.
Powers and signs: the difference between \((-a)^2\) and \(-a^2\)
Standard notation (the usual math form)
\((-a)^{2}\) \(=\) \(+a^{2}\)
\(-a^{2}\) \(=\) \(-(a \times a)\)
In words (symbols replaced with words)
① \((-a)^2\): power with parentheses \(=\) ② \(+a^2\): two factors of \(-a\) multiplied
③ \(-a^2\): power without parentheses \(=\) ④ \(-(a \times a)\): \(a\) times \(a\), then −
The formula in words
① In the \((-a)^2\): power with parentheses the exponent 2 applies to everything in the parentheses, so it is \((-a) \times (-a)\). With two negatives (an even number), the answer is
② the \(+a^2\): two factors of \(-a\) multiplied (the sign is +). On the other hand, in the
③ \(-a^2\): power without parentheses the exponent 2 applies only to the \(a\) just to its left, so the answer is
④ the \(-(a \times a)\): \(a\) times \(a\), then − and the sign of the answer is the opposite
Quick example
When \(a = 2\), the two expressions give answers with opposite signs
\((-2)^2\) with parentheses \(=\) answer +4
\(-2^2\) without parentheses \(=\) answer −4
\((-2)^{2} = (-2) \times (-2) = +4\)
\(-2^{2} = -(2 \times 2) = -4\)
Key idea
The exponent of a power (multiplying the same number several times) applies only to what is just to its left. \((-2)^2\) applies to everything in the parentheses, so it multiplies −2 by itself and gives +4. In \(-2^2\), the exponent applies only to the 2, so you get \(2 \times 2 = 4\) and then put − in front: −4. This is one of the most common mistakes on tests, so remember: to raise a negative number itself to a power, always use parentheses. This calculator tells the two ways of writing apart and calculates each correctly.
Work with positive and negative numbers in this order, the same order as PEMDAS: (1) powers and anything inside parentheses first, (2) multiplication and division (the sign is + for an even number of negatives and − for an odd number), (3) rewrite subtraction as adding the opposite, (4) add from left to right (same signs: add the absolute values and keep the common sign; different signs: subtract the absolute values and use the sign of the larger one). This calculator shows exactly these steps.

Symbols and terms

Symbols

\(+\) plus A symbol with two jobs. It shows addition, as in "3 + 5", and it shows that a number is greater than 0 (positive), as in "+3" (the positive sign). The positive sign is usually left out, so 3 and +3 are the same number.
\(-\) minus Like +, a symbol with two jobs. It shows subtraction, as in "5 − 3", and it shows that a number is less than 0 (negative), as in "−3" (the negative sign). Switching between these two jobs (rewriting subtraction as adding a negative number) is the key to calculating with positive and negative numbers.
\(\times,\ \div\) times, divided by The symbols for multiplication and division. In an expression, they are done before addition and subtraction. On a keyboard, * is usually used for × and / for ÷, and this calculator accepts both.
\((\ )\) parentheses Symbols that group part of a calculation. What is inside parentheses is calculated first. They also wrap a negative number when an operation sign and a number sign would sit side by side, as in "5 − (−2)" (so that two signs are never written next to each other, like − −).
\(a^{2}\) a squared How a power is written. The small raised number (the exponent) tells how many factors of the same number are multiplied, so \(a^2 = a \times a\). The exponent applies only to what is just to its left, so \((-2)^2 = +4\) and \(-2^2 = -4\) are different expressions.

Terms

positive number A number greater than 0, such as +3 or 2.5. On a number line, it is to the right of 0. The + sign can be left out, so all the ordinary numbers you have used so far are positive numbers.
negative number A number less than 0, such as −3 or −0.5. On a number line, it is to the left of 0. It is used for amounts below a reference point or in the opposite direction, such as a temperature of −5°F or a balance of −$300 (a loss). 0 is neither positive nor negative.
sign The + or − in front of a number. A number with + (or with nothing) is positive, and a number with − is negative. Calculating with positive and negative numbers always has two parts - deciding the sign and calculating the absolute value.
absolute value The distance of a number from 0 on the number line. It is the size of the number without its sign - the absolute value of −5 is 5 and of +3 is 3. All the sign rules for addition and multiplication are stated using the sign and the absolute value.
term Each separate number when an expression is rewritten as additions only. −3 + 5 − (−2) becomes −3 + 5 + 2, which has three terms - −3, +5 and +2.
same sign When two numbers have the same sign (+ and +, or − and −). Both the addition rules and the rules for removing parentheses depend on whether the signs are the same or different.
different signs When two numbers have different signs (+ and −). Both the addition rules and the rules for removing parentheses depend on whether the signs are the same or different.
four operations Addition, subtraction, multiplication and division together. An expression that mixes them is worked out in the order of operations.
addition Combining numbers into a sum. With positive and negative numbers, the starting point is that any subtraction can be turned into addition by changing the sign of the number being subtracted.
subtraction Taking one number away from another to find the difference. With positive and negative numbers, subtraction is rewritten as adding the opposite of the number being subtracted.
multiplication Finding a product. In an expression it is done before addition and subtraction. The sign of the answer is + for an even number of negatives and − for an odd number.
division Finding a quotient. In an expression it is done before addition and subtraction. As with multiplication, the sign of the answer is + for an even number of negatives and − for an odd number.
power Multiplying the same number several times, written like \((-2)^3 = (-2) \times (-2) \times (-2) = -8\). The small raised number (the exponent) tells how many factors are multiplied. Powers are calculated before multiplication and division.
exponent The small raised number in a power. It tells how many factors are multiplied. The exponent applies only to what is just to its left, so parentheses change the answer - \((-2)^2 = +4\) but \(-2^2 = -4\).
number line A drawing that shows numbers as points on a straight line. Positive numbers are to the right of 0 and negative numbers to the left, and numbers get larger to the right. Addition can be shown as arrows (right for +, left for −), which makes it a great way to picture positive and negative numbers.
reciprocal The number you multiply by to get 1. The reciprocal of \(\dfrac{2}{3}\) is \(\dfrac{3}{2}\). Dividing by a fraction is done by multiplying by its reciprocal. Note that the sign does not change (the reciprocal of a negative number is still negative).

Good to know before you start

Here is what helps you use the calculation on this page with real understanding, not just by pressing the button.
If you get stuck, going back over these topics is the quickest way forward.

Operations with whole numbers and decimals (Grades 1–6)
  • Being able to add, subtract, multiply and divide positive numbers correctly (once the sign is decided, calculating with positive and negative numbers comes down to ordinary calculation with the absolute values)
  • Knowing divisions like 18 ÷ 3 = 6, and that some divisions do not come out even
Working with fractions (Grades 4–6)
  • Being able to find a common denominator and simplify fractions (example - \(\dfrac{1}{2} = \dfrac{3}{6}\))
  • Knowing that dividing by a fraction is the same as multiplying by its reciprocal
Order of operations (Grades 5–6)
  • Knowing the rule "parentheses → exponents → multiplication and division → addition and subtraction" (PEMDAS)
  • Being able to follow the order, as in 6 + 2 × 3 = 12 (2 × 3 first)
The number line (Grades 3–6)
  • Being able to place numbers on a number line and compare them (numbers farther right are larger)
  • Picturing "moving right = getting larger, moving left = getting smaller" (the number lines on this page are drawn this way)

How to calculate it in Excel

Copy the whole table below and paste it into cell A1 in Excel. It works as is.
Table to calculate an expression directly
Expression (type = and then the expression) =-3+5-(-2)
Table to check adding two numbers with the same sign
Number a -3
Number b -4
Sum a+b =B1+B2
Table to check adding two numbers with different signs
Number a -3
Number b 5
Sum a+b =B1+B2
Table to check subtraction
Number a 8
Number subtracted b -5
Difference a−b =B1-B2
Table to check the signs in multiplication and division
Number a -2
Number b -3
Product a×b =B1*B2
Quotient a÷b =B1/B2
Table to check powers and signs
Number a -3
Exponent n 2
Power a^n =B1^B2
In Excel, × is written as "*", ÷ as "/" and a power as "^". As in the first table, type "=" followed by the expression in a cell to calculate a whole expression with positive and negative numbers at once. The example expression gives 4.
The other tables check the sign rules from the "Formula" section with cell references. The same-sign addition example gives −7, the different-sign addition example gives 2, the subtraction example gives 8−(−5) = 13, and the multiplication example gives (−2)×(−3) = 6.
The power table uses cell references (=B1^B2), so it gives (−3)² = 9, as in math. But if you type "=-3^2" directly, Excel returns 9, because it applies the leading minus before the power (the opposite of the math convention, −3² = −9). If you want −3², type "=-(3^2)".

How to calculate it in Google Sheets

Copy the whole table below and paste it into cell A1 in Google Sheets. It works as is.
Table to calculate an expression directly
Expression (type = and then the expression) =-3+5-(-2)
Table to check adding two numbers with the same sign
Number a -3
Number b -4
Sum a+b =B1+B2
Table to check adding two numbers with different signs
Number a -3
Number b 5
Sum a+b =B1+B2
Table to check subtraction
Number a 8
Number subtracted b -5
Difference a−b =B1-B2
Table to check the signs in multiplication and division
Number a -2
Number b -3
Product a×b =B1*B2
Quotient a÷b =B1/B2
Table to check powers and signs
Number a -3
Exponent n 2
Power a^n =B1^B2
The same formulas as in Excel work as is. Copy the whole table, paste it into cell A1, and replace the numbers with your own.
Google Sheets also returns 9 if you type "=-3^2" directly (the leading minus comes before the power), just like Excel. If you want −3², type "=-(3^2)".

How to calculate it in Python

from fractions import Fraction

# Write the expression as is (× is *, ÷ is /, a power is **)
# Python handles signs the same way as math: -2**2 is -(2 squared) = -4
result = -3 + 5 - (-2)
print(f"Answer: {result}")

# For expressions with division, Fraction keeps the exact value as a fraction with no rounding error
exact_value = Fraction(6) / (-4) + 1   # 6 ÷ (−4) + 1
print(f"Answer as a fraction: {exact_value}")
print(f"As a decimal: {float(exact_value)}")
The first example calculates -3+5-(-2) as is and prints "4". The second example has a division. With the fractions module from the standard library, 6÷(−4)+1 gives the exact fraction "-1/2" (-0.5 as a decimal). Replace the expressions with your own and run it.

How to write it in LaTeX and other math languages (copy and paste)

Adding two numbers with the same sign
(−a) + (−b) = −(a + b)
(-a) + (-b) = -(a + b)
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
  <mrow>
    <mo>(</mo><mo>&#x2212;</mo><mi>a</mi><mo>)</mo>
    <mo>+</mo>
    <mo>(</mo><mo>&#x2212;</mo><mi>b</mi><mo>)</mo>
    <mo>=</mo>
    <mo>&#x2212;</mo><mo>(</mo><mi>a</mi><mo>+</mo><mi>b</mi><mo>)</mo>
  </mrow>
</math>
(-a) + (-b) = -(a + b)
(-a) + (-b)
(-a) + (-b);
(-a) + (-b)
(-a) + (-b) = -(a + b)
Adding two numbers with different signs
(−a) + b = +(b − a)  (when 0 < a < b)
(-a) + b = +(b - a) \quad (0 < a < b)
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
  <mrow>
    <mo>(</mo><mo>&#x2212;</mo><mi>a</mi><mo>)</mo>
    <mo>+</mo>
    <mi>b</mi>
    <mo>=</mo>
    <mo>+</mo><mo>(</mo><mi>b</mi><mo>&#x2212;</mo><mi>a</mi><mo>)</mo>
  </mrow>
</math>
(-a) + b = +(b - a)
(-a) + b
(-a) + b;
(-a) + b
(-a) + b = +(b - a)
Subtracting is adding the opposite
a − (−b) = a + b
a - (-b) = a + b
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
  <mrow>
    <mi>a</mi>
    <mo>&#x2212;</mo>
    <mo>(</mo><mo>&#x2212;</mo><mi>b</mi><mo>)</mo>
    <mo>=</mo>
    <mi>a</mi><mo>+</mo><mi>b</mi>
  </mrow>
</math>
a - (-b) = a + b
a - (-b)
a - (-b);
a - (-b)
a - (-b) = a + b
Sign rules for multiplication and division
(−a) × (−b) = +ab
(-a) \times (-b) = +ab
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
  <mrow>
    <mo>(</mo><mo>&#x2212;</mo><mi>a</mi><mo>)</mo>
    <mo>&#xD7;</mo>
    <mo>(</mo><mo>&#x2212;</mo><mi>b</mi><mo>)</mo>
    <mo>=</mo>
    <mo>+</mo><mi>a</mi><mi>b</mi>
  </mrow>
</math>
(-a) xx (-b) = +ab
(-a) * (-b)
(-a) * (-b);
(-a) * (-b)
(-a) × (-b) = +ab
Powers and signs: the difference between \((-a)^2\) and \(-a^2\)
(−a)² = +a², −a² = −(a × a)
(-a)^{2} = +a^{2}, \quad -a^{2} = -(a \times a)
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
  <mrow>
    <msup><mrow><mo>(</mo><mo>&#x2212;</mo><mi>a</mi><mo>)</mo></mrow><mn>2</mn></msup>
    <mo>=</mo>
    <mo>+</mo><msup><mi>a</mi><mn>2</mn></msup>
    <mo>,</mo>
    <mo>&#x2212;</mo><msup><mi>a</mi><mn>2</mn></msup>
    <mo>=</mo>
    <mo>&#x2212;</mo><mo>(</mo><mi>a</mi><mo>&#xD7;</mo><mi>a</mi><mo>)</mo>
  </mrow>
</math>
(-a)^2 = +a^2, -a^2 = -(a xx a)
{(-a)^2, -a^2}
(-a)^2; -a^2;
[(-a)^2, -a^2]
(-a)^2 = +a^2, -a^2 = -(a × a)

How to have ChatGPT  do the calculation

You are a math calculation assistant (middle school math). Do the following calculation by actually running Python code, and base your answer only on the numbers from the execution result (do not answer by mental math or guessing).

Calculate each of the following expressions with positive and negative numbers.
1. -3+5-(-2)
2. (-2)×(-3)-4
3. 6÷(-2)+1
4. (-2)^2 and -2^2 (also explain the difference between the two)

In Python, change × to *, ÷ to / and powers to **, and calculate expressions with division exactly using the fractions module from the standard library. For each one, explain the sign rules used (same or different signs, how many negative numbers) in words a 7th grader can understand, and show the formulas you used and the numbers from the execution result.

How to Use
  1. 1
    Enter your numbers
    Type the numbers you want to calculate with into the input fields
  2. 2
    Calculate
    Press the "Calculate" button
  3. 3
    Check the result
    The result appears on the spot. The same page also explains the idea behind the calculation and the formula
  DataChef Features
Easy and Free
Unlimited conversions for free.
No technical knowledge required.
Intuitive and user-friendly operation.
No Registration Required
Available immediately after access.
Can be used without registering personal information.
Safe and Secure
Fully SSL encrypted communication.
Automatic file deletion by clicking "download".
Fast
High-speed site access
and rapid file conversion.
No Watermark
No watermark.
No attribution required.
Commercial Use Available
Free for commercial use.
No need to contact us for commercial use permission.