ForHosting KIT · Math

Complex number addition calculator

(3 + 2i) + (1 − 4i) is 4 − 2i: enter the real and imaginary parts of two complex numbers and get their sum in standard form, with the rule shown next to the answer. Free in your browser.

  • Free
  • Runs in your browser
  • No sign-up
  • Your data stays on your device
Use it from WebAPIEmailTelegramApp soon
If you enter
A real
3
A imag
2
B real
1
B imag
-4
You get
Sum real
4
Sum imag
-2
First text
3+2i
Second text
1-4i

Complex numbers of the form a plus bi appear in electrical engineering phasors, control systems, quantum amplitudes, and every algebra course that extends the real line with a square root of negative one. Adding them is the first operation students learn after the rectangular representation itself: sum the real parts, sum the imaginary parts, and write the result as a single complex number in standard a plus bi form. This complex number addition calculator accepts the four finite coefficients of two operands, applies that component-wise rule with stable rounding, and returns both numeric sum parts and a clean rectangular display string.

How complex addition works in rectangular form

A complex number in rectangular form is a pair of real numbers written a plus bi, where a is the real part, b is the imaginary part, and i denotes the imaginary unit with i squared equal to negative one. Geometric addition of two such numbers is vector addition in the plane: the real axis carries a, the imaginary axis carries b, and the parallelogram rule moves the tip of one arrow to the tip of the other.

Negative imaginary parts are normal and appear with a minus sign in the rectangular string, for example three minus four i when the sum is three on the real axis and negative four on the imaginary axis. The formula field always restates the identity (a+bi)+(c+di)=(a+c)+(b+d)i so tutorials can show the rule next to the numeric answer without maintaining a separate content table.

Classroom and homework checks

Let students submit two complex numbers as real and imaginary parts and verify the rectangular sum against textbook component-wise addition.

Exam and LMS auto-grading

Mark complex addition items with a deterministic oracle that rejects non-finite coefficients and never invents polar intermediate steps.

Phasor and notebook scripts

Accumulate rectangular phasors or impedance branches in automation without importing a full computer-algebra library for simple sums.

What form is the result returned in?

Polar magnitude and argument are not computed here.

Can one operand be purely real or purely imaginary?

Yes. Set the unused part to zero. The sum still uses component-wise addition, and the display string omits redundant zero pieces when appropriate.

What happens if a coefficient is missing or not a number?

Invalid input is not billed and does not return a partial sum.

How do you add two complex numbers?

Add the real parts together and the imaginary parts together. For (3 + 2i) + (1 − 4i), 3 + 1 gives 4 and 2 − 4 gives −2, so the sum is 4 − 2i.

What does adding complex numbers mean on a graph?

It is vector addition in the plane: the real part runs along the real axis and the imaginary part along the imaginary axis. Placing one arrow at the tip of the other gives the sum, following the parallelogram rule.

Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.

POSThttps://api.kit.forhosting.com/algebra/complex-add

Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, by email and from Telegram — and soon from our app too.

curl -X POST https://api.kit.forhosting.com/algebra/complex-add \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"a_real":3,"a_imag":2,"b_real":1,"b_imag":-4}'
{
  "a_real": 3,
  "a_imag": 2,
  "b_real": 1,
  "b_imag": -4
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "algebra.complex_add",
  "status": "queued",
  "_links": {
    "result": "/tasks/tsk_…/result"
  }
}

The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.

Per request$0.002

Published price — no tokens, no invented credits. A failed task is never charged.

HTTPCodeMeaning
401unauthorizedMissing or invalid API key.
402insufficient_balanceYour balance doesn't cover the task price.
404unknown_typeThat task type doesn't exist.
429rate_limitedToo many requests. Use the webhook instead of polling.

Missing or non-finite coefficients fail with invalid_input and are not billed.

How complex addition works in rectangular form

Algebraically that is exactly component-wise sum: if the first operand is a_real plus a_imag times i and the second is b_real plus b_imag times i, then the sum has real part a_real plus b_real and imaginary part a_imag plus b_imag. No cross terms appear because addition never multiplies the imaginary unit into the other coefficient; that happens only for complex multiplication, which this endpoint does not perform. Zero real or zero imaginary parts are allowed and produce pure imaginary or pure real results, still returned with explicit sum_real and sum_imag fields so clients never have to re-parse a display string.

Input contract, response shape, and validation

Pure real sums omit the imaginary unit, pure imaginary sums omit a zero real part when appropriate, unit coefficients render as i or minus i rather than one i, and mixed signs use a single plus or minus between the real and imaginary pieces. Pair the response with your own Argand-plane plot if you need a diagram; this capability computes addition only and does not emit polar form, modulus, or argument unless you compute them from the returned rectangular parts in a later step. POST a JSON body with four required finite numbers: a_real and a_imag for the first complex operand, b_real and b_imag for the second. Each field may arrive as a JSON number or as a numeric string; empty strings, missing keys, Infinity, NaN, and non-numeric text fail with invalid_input naming the field, and those failures do not consume prepaid balance. Optional aliases such as re_a, im_a, real_a, and a_re map to the same canonical names so generated clients and hand-written scripts stay flexible. On success the body echoes the four rounded input coefficients, returns sum_real and sum_imag as the component-wise totals rounded to twelve decimal places for stable goldens across runtimes, and supplies three display strings: a and b for the operands and sum for the result in standard rectangular form. Example: a_real three, a_imag two, b_real one, b_imag negative four yields sum_real four and sum_imag negative two, with sum string four minus two i.

Where a complex addition API earns its keep

Classrooms and tutoring platforms use a complex number addition calculator so learners can check rectangular sums without sign errors when combining positive and negative imaginary parts. Engineering notebooks in circuits and signal processing often reduce phasor series or impedance branches to successive rectangular additions before converting back to polar form for magnitude checks; calling a tiny API avoids pulling a full computer-algebra system for four arithmetic operations. Because the implementation is pure parse, every successful call costs the published $0.002 base price.

How do I add two complex numbers with this calculator?

Send four finite numbers: a_real, a_imag, b_real, and b_imag. The API returns sum_real = a_real + b_real, sum_imag = a_imag + b_imag, and a rectangular sum string such as 4-2i.

What does the complex number addition calculator cost?

The browser tool is free. API requests use prepaid KIT balance at $0.002 per successful call; invalid input is not billed.

Read the full KIT documentation →