We use cookies.This website uses essential cookies to operate core features. With your consent, we also use analytics cookies to understand traffic and improve the service. For more details, see our .
Was this tool helpful to use?
Your feedback helps us make it better
Enter two values, a and b, to automatically calculate the difference of squares (a+b)(a-b) and simplify your algebraic calculations.
Enter details to see results
Overview
Understand what the tool solves, how it works, and the boundaries of its data.
This calculator takes numeric values for a and b, squares each value, and subtracts the second square from the first:
The identity works because expanding the conjugate factors produces opposite middle terms that cancel. For example, with a = 10.5 and b = 2.5, the result is 110.25 − 6.25 = 104; the equivalent product is 13 × 8 = 104. A negative result is possible when b² is greater than a².
The page evaluates numbers and shows a substituted equation. It does not accept symbolic expressions such as x² − 9 or factor a polynomial for you.
Guide
Follow the workflow and verify inputs and outputs with practical examples.
Enter a number in each of the a and b fields. Integers, decimals, and negative numbers are valid numeric inputs.
Choose how many decimal places to display. The control offers 0 through 10 places and starts at 6. Integer results display without extra decimal zeros.
Keep rounding on to round to the selected number of places, or turn it off to truncate toward zero. The setting changes the displayed value, not the formula.
Read the equation and result together. For a cross-check, evaluate (a + b)(a − b) with the same inputs.
For instance, a = 1.5 and b = 1 gives 1.25. At one decimal place, rounding displays 1.3 while truncation displays 1.2.
Use cases
See how the tool fits into real work and everyday tasks.
Substitute the exercise's numeric values for a and b, then compare the displayed equation with your written work. If you are studying factorization, multiply the two conjugate factors separately to see whether they match the result.
When two quantities are represented by numeric values in the same units, the calculator quickly finds the difference of their squares. Keep the input order: a = 3 and b = 5 yields −16, while reversing them yields 16.
Q&A
Find concise answers to common questions and confusing cases.
Yes. Each input is squared before subtraction, so a = −5 and b = 3 gives 25 − 9 = 16.
The operation is ordered: a² − b². Swapping the inputs gives b² − a², which is the opposite value unless the squares are equal.
No. It controls formatting of the numeric result. Rounding or truncation can hide later decimal places, and ordinary floating-point arithmetic can have small representation limits for some values.
Notes
Review scope, result limitations, and important precautions before use.
The calculator works with ordinary numeric values and formats the result to the chosen decimal-place setting. It is not a symbolic algebra system or an arbitrary-precision tool. Very large or very small values can exceed the finite numeric range or show floating-point effects; a result that cannot be represented as a finite number may be blank. For work that requires certified measurement, financial settlement, or exact symbolic manipulation, use a method designed for that precision and verify the result independently.
Related
Discover related tools, collections, and available API capabilities.