P:Parentheses
Perform operations inside of parenthesis or groups before you do anything else (if there are no groups or parentheses, you can skip this step).
E:Exponents
Next, after performing operations inside of parenthesis and groupings (if there are any), apply any exponents (if there are no exponents, you can skip this step).
M and D:Multiplication and Division
Next, after the parentheses and groups and the exponents, perform multiplying/dividing from left to right based on whichever operation is first).
A/S: Addition and Subtraction
Finally, after multiplying and/or dividing, perform adding/subtracting from left to right based on whichever operation is first).
3+1*4
4*4=16
27/{8-5} squared
27/3 squared
27/9=3