Signed answer and calculation steps
The main answer is an integer or a reduced fraction, with a mixed-number form for fractions and a decimal rounded to at most twenty places. The step-by-step working opens below the calculator: each row shows one operation and the whole expression rewritten after it, so you can check where every sign and value comes from.
For arithmetic with fractions entered directly, use the Fraction Calculator instead of an integer-only expression.
The formula
Parentheses are resolved first, then multiplication and division from left to right, followed by addition and subtraction from left to right. Fractions are reduced after each operation, preserving exact results even when a division does not produce an integer.
Subtracting a negative and applying precedence
Enter (-8) - (-3) + 2 * 4. Multiplication produces 8, subtracting negative 3 from negative 8 produces −5, and −5 + 8 gives the exact answer 3. Replacing the expression with -7 / 2 gives −7/2 and decimal −3.5.
How to use this calculator
- Enter whole integers and the arithmetic symbols between them, or use the symbol buttons.
- Use parentheses to group work and a minus sign for a negative value.
- Calculate or wait for the live answer after typing.
- Read the step-by-step working below the calculator and copy the exact answer if needed.
Following signs without losing the order
A negative sign describes a number below zero. Subtraction applies to the number that follows it, so subtracting a negative is equivalent to adding its positive opposite. Writing negative values inside parentheses often makes an expression easier to read, especially beside another subtraction sign.
Multiplying or dividing two values with the same sign produces a nonnegative result; opposite signs produce a negative result unless the numerator or product is zero. Addition with different signs depends on the magnitudes. The table shows concrete operations rather than asking you to infer the result from a sign alone.
Why an integer expression can produce a fraction
The inputs are whole integers, but division is not always evenly divisible. Seven divided by two is a rational number. Instead of truncating it, the main answer displays the reduced fraction and gives a decimal view alongside it. Subsequent operations continue using that exact fraction.
This page is designed for signed arithmetic and mixed expressions. It does not solve unknown variables, infer implicit multiplication or accept decimal literals. For decimal expressions, use the four-function calculator; for operations on large standalone quantities, use the large-number tool.
Assumptions & limitations
What this calculation assumes
- Every numeric literal is a whole decimal integer.
- Standard arithmetic precedence applies; juxtaposition such as 2(3 + 4) needs an explicit multiplication sign.
What to keep in mind
- Use at most 1,200 characters, 200 tokens and 100 digits per integer. Results are limited to 1,000 numerator and denominator digits.
- Decimals, powers, functions, variables and division by zero are not accepted.
Common questions
Why is -7 / 2 shown as a fraction?
The quotient is not an integer. The exact answer is −7/2; its decimal form is −3.5.
Does multiplication happen before addition?
Yes. In 2 + 3 * 4, multiplication produces 12 before adding 2, giving 14. Use parentheses to change the grouping.
Can I enter two minus signs?
Yes. A subtraction followed by a negative sign, such as 8 - -3, is accepted. Parentheses can make the same expression clearer: 8 - (-3).
What is the mixed number for a negative fraction?
The whole part and the fraction share the sign. For example, −17/3 is −5 2/3, meaning −(5 + 2/3), and its decimal form is about −5.6667.
Sources & further reading
Reviewed on