Skip to main content
Skip to calculator
Advertisement

Last updated: July 31, 2026

FOIL Calculator

Helpful
Not helpful
Save as image
Share
Embed
Cite
Write feedback

Formula

(ax + b)(cx + d) = (ac)x² + (ad + bc)x + bd

Where:

  • a=a coefficient
  • b=b constant
  • c=c coefficient
  • d=d constant
FOIL MethodArcs connecting the First, Outer, Inner, and Last terms of (x + 2) and (x + 3) being multiplied.(x + 2)(x + 3)FirstOuterInnerLastx² + 5x + 6
FOIL multiplies the First, Outer, Inner, and Last terms of two binomials, then combines like terms.

Worked Examples

Positive coefficients

Expand (2x+3)(4x+5).

  1. 1First: 2x·4x = 8x²
  2. 2Outer+Inner: 2x·5 + 3·4x = 22x
  3. 3Last: 3·5 = 15
Final Answer: coefficientX2=8, coefficientX=22, constant=15

Mixed signs

Expand (x-7)(3x+2).

  1. 1ac = 3
  2. 2ad+bc = 2 + (-21) = -19
  3. 3bd = -14
Final Answer: coefficientX2=3, coefficientX=-19, constant=-14

Decimal coefficients

Expand (0.5x+1.2)(2x-4).

  1. 1ac = 1
  2. 2ad+bc = -2 + 2.4 = 0.4
  3. 3bd = -4.8
Final Answer: coefficientX2=1, coefficientX=0.4, constant=-4.8

Introduction

FOIL is a structured way to multiply two binomials and collect like terms into a quadratic expression.

Formula and Method

FOIL Calculator applies (ax + b)(cx + d) = (ac)x² + (ad + bc)x + bd and returns deterministic outputs from validated inputs.

  • Validate each required input

  • Apply the stated formula

  • Round numeric outputs where needed

  • Return safe defaults when validation fails

Input Fields

Use these keys exactly as defined in calculation.ts.

  1. 1

    a: a coefficient

  2. 2

    b: b constant

  3. 3

    c: c coefficient

  4. 4

    d: d constant

Output Fields

These values map directly to calculation.ts return keys.

  1. 1

    coefficientX2: Coefficient of x² term after expansion

  2. 2

    coefficientX: Coefficient of x term after expansion

  3. 3

    constant: Constant term after expansion

Validation Rules

All four coefficients must be finite numbers.

  • Finite numeric values are required

  • Domain restrictions are enforced before solving

  • Invalid input returns default-safe outputs

  • Check examples to confirm expected behavior

How to Use This Calculator

Enter inputs, run the calculation, and read the primary output first.

  • Enter all required values

  • Click calculate

  • Review primary output first

  • Use supporting outputs for interpretation

Practical Uses

This calculator is useful for study, verification, and fast applied math checks.

  • Algebra expansion checks

  • Factoring verification

  • Quadratic construction

  • Classroom step demonstration

FAQs

What does the FOIL Calculator compute?

It computes x² Coefficient and supporting outputs from your inputs.

Which inputs are required?

Required inputs are: a coefficient, b constant, c coefficient, d constant.

How are invalid inputs handled?

When validation fails, the calculator returns safe default values and does not attempt invalid math.

Are results rounded?

Yes. Numeric outputs are rounded inside calculation.ts (typically to 6 decimal places).

Can I use negative or decimal values?

Yes. Integers and decimals are supported, including negative values.

How should I verify my answer?

Use the worked examples and compare each output key with your manual steps.