# PEMDAS Order of Operations Calculator that Shows its Work

This PEMDAS Calculator will solve math expressions based on the PEMDAS order of operation convention (Parenthesis, Exponents, Multiplication, Division, Addition, Subtraction) and show the steps.

You can either enter a custom PEMDAS math problem to solve, or you can select from a list of example problems. In either case, the calculator will attempt to solve the problem and display the step-by-step order used to arrive at the solution.

## PEMDAS Calculator

Solve math expressions using the P.E.M.D.A.S. convention for order of operations.

Special Instructions

#### Selected Data Record:

A Data Record is a set of calculator entries that are stored in your web browser's Local Storage. If a Data Record is currently selected in the "Data" tab, this line will list the name you gave to that data record. If no data record is selected, or you have no entries stored for this calculator, the line will display "None".

DataData recordData recordSelected data record: None
Example problems:

#### Example order of operation problems:

To see an example of how the PEMDAS solver calculates a solution, and what types of problems the calculator is set up to handle, select a math expression from the drop-down menu. To clear the expression field to enter your own equation, select "Example Problems" or click the "Reset" button.

PEMDAS problem:

#### PEMDAS expression:

Enter a math expression that fits within the following guidelines:

• No spaces between numbers or operators.
• Numbers, parenthesis, and operators only (no letters or variables).
• Contains only numbers, decimal points, and these valid characters: ( ^ * / + - ).
• Contains the same number of left and right parenthesis.
• Numbers with a leading decimal point must be preceded by a zero (enter .5 as 0.5).
• If a number (numeric operand) immediately precedes a left parenthesis (indicating multiplication), the calculator will attempt to insert a multiplication operator between the number and the left parenthesis (convert 2(2+1) to 2*(2+1) ). However, you might get more predictable results if you insert the multiplication operator when you enter the problem.
 # Order of Operation Problem
Calculated solution:

#### Calculated solution:

This line will either display the calculated solution or "Not a Number" (if a problem was encountered). Note that if any decimal numbers are part of the entered math problem, the solution will likely be rounded to no more than three decimal places.

If you would like to save the current entries to the secure online database, tap or click on the Data tab, select "New Data Record", give the data record a name, then tap or click the Save button. To save changes to previously saved entries, simply tap the Save button. Please select and "Clear" any data records you no longer need.

## Learn

### What PEMDAS is and why and how it is used to solve math problems.

#### What is PEMDAS?

PEMDAS is an acronym for an order of operations convention used to solve ambiguous math problems.

The acronym stands for Parenthesis, Exponents, Multiplication, Division, Addition, and Subtraction.

The convention represented by the PEMDAS acronym means to solve expressions within groupings (parenthesis, brackets, curly braces, etc.) first, then exponents, then multiplication and division, and finally addition and subtraction.

Multiplication and division have the same priority and are both left-to-right associated, so you simply solve them in the order they appear from left to right.

Likewise, addition and subtraction have the same priority and are both left-to-right associated, so you also solve them in the order they appear from left to right.

Exponents, on the other hand, are right-to-left associated, so if exponents appear next to each other (2^2^3), they are solved from right to left (2^3 first, then 2^8). If they don't appear next to each other (2^2 + 2^3), then they are simply solved in the order they appear from left to right (4 + 8).

#### Why is PEMDAS Needed?

The PEMDAS convention is needed when math expressions are written in an ambiguous form. For example, the following expression leaves no question as to what order the operations are to be performed:

3 + (4 * 3)

However, if the parentheses are removed, without a convention the expression could yield more than one answer depending on the order the operations are performed.

3 + 4 = 7 * 3 = 21

4 * 3 = 12 + 4 = 16

So by solving the expression according to the PEMDAS order of operation convention, everyone solving the expression will come up with the same answer of 16 (multiplication is performed before addition).

The following examples demonstrate how to solve ambiguous math problems using the PEMDAS convention.

##### Example: 8/2(2+2)
 Solve expressions within the parenthesis first. = 8/2*(2+2)= 8/2*(4) Remove the solved parenthesis and solve the remaining expression from highest precendence to lowest presedence. Since multiplication and division have the same precendence, solve them in the order they appear from left to right. Since division is encountered first, solve the division. = 8/2*4= 4*4 Solve the remaining multiplication. = 4*4= 16
##### Example: 5*(6^2-2)
 Solve expressions within the parenthesis first, from highest precendence to lowest precedence. Since exponents have a higher precedence than subtraction, solve 6^2 first. = 5*(6^2-2)= 5*(36-2) Next, solve the remaining subtraction within the parenthesis. = 5*(36-2)= 5*(34) Finally, remove the parentheses and solve the remaining multiplication. = 5*34= 170
##### Example: (18/3)^2+((13+7)*5^2)
 Solve expressions within the parenthesis first, working from left to right, and from the most nested parenthesis to the most outer parenthesis. Since (18/3) is the first parenthesis encountered from left to right, solve within that parenthesis first. = (18/3)^2+((13+7)*5^2)= (6)^2+((13+7)*5^2) Remove the solved parenthesis and solve expressions within the the next parenthesis, working from the most nested parenthesis to the most outer parenthesis. Since (13+7) is the inner-most parenthesis in the next parenthesis, solve within that parenthesis first. = 6^2+((13+7)*5^2)= 6^2+((20)*5^2) Remove the solved nested parenthesis and solve the remaining expression within the current parenthesis. Since exponents have a higher precedence than multiplication, solve 5^2 first. = 6^2+(20*5^2)= 6^2+(20*25) Solve the remaining multiplication within the current parenthesis. = 6^2+(20*25)= 6^2+(500) Remove the solved parenthesis and solve the remaining expression from highest precendence to lowest presedence. Since exponents have a higher precedence than addition, solve 6^2 first. = 6^2+500= 36+500 Solve the remaining addition. = 36+500= 536

Move the slider to left and right to adjust the calculator width. Note that the Help and Tools panel will be hidden when the calculator is too wide to fit both on the screen. Moving the slider to the left will bring the instructions and tools panel back into view.

Also note that some calculators will reformat to accommodate the screen size as you make the calculator wider or narrower. If the calculator is narrow, columns of entry rows will be converted to a vertical entry form, whereas a wider calculator will display columns of entry rows, and the entry fields will be smaller in size ... since they will not need to be "thumb friendly".