Sum of Two Cubes Calculator
Instantly compute a³ + b³ for any two numbers. Enter the values of a and b, and the calculator shows each cube and their sum, with the factoring identity a³ + b³ = (a + b)(a² − ab + b²).
Find the Sum of Two Cubes
Sum of Two Cubes Formula
Where:
- \(a\) — the first number (or term)
- \(b\) — the second number (or term)
- \(a^3\) — the cube of \(a\), i.e. \(a \cdot a \cdot a\)
- \(b^3\) — the cube of \(b\), i.e. \(b \cdot b \cdot b\)
On the left side, the formula gives the plain sum of the two cubes; on the right side, it shows the same quantity factored into a binomial \((a + b)\) and a trinomial \((a^2 - ab + b^2)\). Both sides are always equal, which is what makes this identity so useful for simplifying and factoring polynomial expressions.
Sum of Two Cubes – Calculation Example
Example: find the sum of the cubes of \(a = 2\) and \(b = 3\).
\[ a^3 = 2^3 = 2 \cdot 2 \cdot 2 = 8 \]
\[ b^3 = 3^3 = 3 \cdot 3 \cdot 3 = 27 \]
\[ a^3 + b^3 = 8 + 27 = 35 \]
Result: \(a^3 = 8\), \(b^3 = 27\), and the sum of the cubes is \(35\).
You can verify this with the factored form as well:
\[ (a + b)(a^2 - ab + b^2) = (2 + 3)(4 - 6 + 9) = 5 \cdot 7 = 35 \]
How to Use the Calculator
- Enter the value of a in the first field (the default is 2).
- Enter the value of b in the second field (the default is 3).
- The results appear instantly: a³, b³, and the Sum of cubes \(a^3 + b^3\).
The calculator accepts decimal and negative numbers, not just integers, so you can use it for any real values of \(a\) and \(b\).
What Is the Sum of Two Cubes?
A cube of a number is that number multiplied by itself twice: \(a^3 = a \cdot a \cdot a\). The sum of two cubes is simply \(a^3 + b^3\) — the result of cubing each number separately and then adding the results. For example, with \(a = 2\) and \(b = 3\), you get \(8 + 27 = 35\).
Beyond straightforward arithmetic, the expression \(a^3 + b^3\) has a special place in algebra because it can always be rewritten using the identity \(a^3 + b^3 = (a + b)(a^2 - ab + b^2)\). This turns a sum of two cubes into a product of a binomial and a trinomial — a process called factoring. For instance, \(x^3 + 27\) can be seen as \(x^3 + 3^3\) and factored as \((x + 3)(x^2 - 3x + 9)\).
Why does this matter? Factoring is one of the main tools for solving polynomial equations, simplifying fractions with polynomial numerators and denominators, and finding roots of functions. Recognizing a sum-of-cubes pattern lets you break a cubic expression into simpler pieces. Note that the trinomial factor \((a^2 - ab + b^2)\) cannot be factored further using real numbers — this is where the factored form stops over the reals, although it does factor further using complex numbers.
The sum of cubes is closely related to the difference of two cubes, \(a^3 - b^3 = (a - b)(a^2 + ab + b^2)\). The two identities look similar, but the signs differ in important ways: in the sum of cubes the binomial has a plus and the middle term of the trinomial is negative, while in the difference of cubes it is the opposite. Mixing up these signs is one of the most common algebra mistakes.
Tips, Assumptions and Limitations
- Works for any real numbers. The values of \(a\) and \(b\) do not have to be positive or whole. Negative bases work fine: \((-2)^3 + 3^3 = -8 + 27 = 19\). Be careful with negative inputs — cubing a negative number gives a negative result.
- Terms must be perfect cubes to factor. The factored identity applies only when each term is a perfect cube (or can be written as one, e.g. \(64x^6 = (4x^2)^3\)). If you are factoring an expression, first rewrite each term as something cubed.
- Order does not matter for the sum. Since addition is commutative, \(a^3 + b^3 = b^3 + a^3\); swapping the two inputs leaves the result unchanged.
- Check your factoring by expanding. Multiplying the factored form back out with the FOIL method or a general binomial multiplication should return the original expression — a quick way to catch sign errors.
- Useful for solving cubic equations. Once an expression like \(x^3 + 8 = 0\) is factored as \((x + 2)(x^2 - 2x + 4) = 0\), you can find its roots by setting each factor to zero. The cubic equation calculator handles the general case.
Historically, sums of cubes also appear in number theory — for example, in the question of which integers can be written as a sum of two cubes in more than one way (the famous Hardy–Ramanujan number \(1729 = 1^3 + 12^3 = 9^3 + 10^3\)). But for everyday algebra homework, this calculator and the identity above cover everything you need.
Frequently Asked Questions
How do I calculate the sum of two cubes by hand?
Cube each number separately, then add the results. To cube a number, multiply it by itself twice: \(a^3 = a \cdot a \cdot a\). For example, with \(a = 4\) and \(b = 5\): \(4^3 = 64\), \(5^3 = 125\), and \(64 + 125 = 189\). Watch the signs — cubing a negative number keeps it negative, so \((-4)^3 = -64\).
How do I factor a sum of two cubes?
Use the identity \(a^3 + b^3 = (a + b)(a^2 - ab + b^2)\). First rewrite each term as something cubed — for example, \(x^3 + 125 = x^3 + 5^3\), which factors as \((x + 5)(x^2 - 5x + 25)\). A helpful mnemonic: the binomial keeps the original sign, and the trinomial always gets the opposite sign in the middle term.
What is the difference between the sum and difference of cubes?
The formulas look similar but the signs differ. The sum of cubes is \(a^3 + b^3 = (a + b)(a^2 - ab + b^2)\), while the difference of cubes is \(a^3 - b^3 = (a - b)(a^2 + ab + b^2)\). The binomial matches the original operation, and the middle term of the trinomial is always the opposite sign. Mixing up these signs is one of the most common algebra errors.
Can the sum of two cubes be zero or negative?
Yes. Because odd powers preserve sign, \(a^3 + b^3 = 0\) exactly when \(b = -a\), such as \(3^3 + (-3)^3 = 27 - 27 = 0\). The sum is negative whenever the negative cube has the larger magnitude, e.g. \((-5)^3 + 2^3 = -125 + 8 = -117\). There are no restrictions on the signs of the inputs.
Why can't the trinomial a² − ab + b² be factored further?
Over the real numbers, \(a^2 - ab + b^2\) has no real roots. Its discriminant, treating it as a quadratic in \(a\), is \((-b)^2 - 4b^2 = -3b^2\), which is negative for any nonzero \(b\). Since it never equals zero for real values, it cannot be written as a product of real linear factors. It does factor over the complex numbers, but that goes beyond standard algebra courses.
How is the sum of two cubes used to solve equations?
Factoring turns a cubic equation into simpler pieces. For example, \(x^3 + 8 = 0\) becomes \((x + 2)(x^2 - 2x + 4) = 0\). Setting each factor to zero gives \(x = -2\) from the binomial; the trinomial has no real solutions because its discriminant is negative. So the equation has exactly one real root. This technique works whenever one term is a perfect cube.
What is the Hardy–Ramanujan number 1729?
1729 is the smallest number expressible as a sum of two positive cubes in two different ways: \(1729 = 1^3 + 12^3 = 9^3 + 10^3\). The story comes from a conversation between mathematicians G. H. Hardy and Srinivasa Ramanujan in 1917. Numbers with this property, called taxicab numbers, are a classic topic in number theory.