ForHosting KIT · Developer Utilities

Complex to polar form calculator

This complex to polar form calculator converts a rectangular complex number, written as a + bi, into its modulus r and principal argument theta.

● BetaFree · in your browser
Use it from WebAPIEmailTelegramApp soon

Enter the real component a and the imaginary coefficient b, then choose radians or degrees for the angle. The result includes both numeric values and a ready-to-read trigonometric representation. It is useful for checking algebra, preparing phasor calculations, and converting structured complex-number data without relying on ambiguous expression parsing.

Enter the rectangular components correctly

Start with a complex number in rectangular form, a + bi. The real input is a, the horizontal coordinate on the complex plane, and the imaginary input is b, the signed coefficient of i and the vertical coordinate. For 3 + 4i, enter 3 and 4. For 3 - 4i, enter 3 and -4; the minus sign belongs to the imaginary coefficient. Both inputs must be finite numbers, so text containing a complete expression, infinity, and missing values are rejected instead of being guessed. This explicit structure makes the calculator dependable in an API pipeline as well as easy to use by hand. The imaginary field also accepts the aliases imag and im for integrations that already use those common names, although imaginary is the clearest canonical field. Choose the output angle unit before interpreting theta. Radians are the default and are standard in higher mathematics and most programming libraries. Degrees can be more convenient for geometry, introductory algebra, circuits, and familiar rotations. The selected unit changes only how theta is reported, not the represented complex number.

Understand how modulus and argument are calculated

The modulus is the distance from the origin to the point (a, b) on the complex plane. It is calculated as r = sqrt(a squared + b squared), using a stable hypot operation, and is therefore always nonnegative. The argument describes the direction of that point from the positive real axis. It is calculated with atan2(b, a), rather than ordinary arctangent, because atan2 preserves the signs of both coordinates and identifies the correct quadrant. The returned theta is the principal argument: in radians it lies from -pi through pi, and in degrees it lies from -180 through 180, subject to the usual endpoint behavior of atan2. Negative angles identify points below the real axis. Other coterminal arguments can describe the same number by adding or subtracting full turns, but returning one principal value keeps results predictable and comparable. The number zero has no unique mathematical argument. For practical deterministic output, this calculator adopts theta = 0 when both components are zero and produces a zero-modulus trigonometric expression. Very small floating-point residues and negative zero are normalized for cleaner results.

Read and use the trigonometric representation

The response returns r, theta, angle_unit, and a trigonometric string in the form r(cos(theta) + i sin(theta)). The numeric fields are the best choice for software: store them, compare them, graph them, or pass them into later calculations without parsing display text. The trigonometric field is intended for reading, copying into notes, and checking that the selected angle unit is visible. To verify a conversion, recover the rectangular components with a = r cos(theta) and b = r sin(theta), making sure the trigonometric functions use the stated unit. For example, a point in quadrant II must have a positive imaginary component, a negative real component, and an argument between 90 and 180 degrees. This sign check catches many manual mistakes. The implementation is deterministic and performs no network request, storage operation, random choice, or clock lookup, so the same valid input always returns the same JSON values. Each API calculation processes one complex number as one item and costs $0.002. The pure calculation is also suitable for the generated browser runner, which shares the same conversion logic.

Check algebra homework

Verify the modulus, quadrant, principal argument, and final trigonometric form of a rectangular complex number.

Prepare phasor calculations

Convert Cartesian signal or circuit components into magnitude and phase values in degrees or radians.

Normalize complex-number records

Turn structured real and imaginary fields into consistent numeric polar fields for storage or later computation.

How is the modulus r calculated?

The modulus is r = sqrt(a squared + b squared), the nonnegative distance from the origin to the point (a, b).

Which argument does the calculator return?

It returns the principal argument from atan2(b, a), expressed in the requested angle unit.

Can theta be returned in degrees?

Yes. Set angle_unit to degrees. If it is omitted, theta is returned in radians.

What happens for the complex number zero?

Its modulus is zero. Although its argument is mathematically undefined, the calculator returns theta = 0 as a documented deterministic convention.

How much does one API conversion cost?

One complex number is one item and costs $0.002. No external service is used.

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-to-polar

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-to-polar \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"real":-3,"imaginary":4}'
{
  "real": -3,
  "imaginary": 4
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "algebra.complex_to_polar",
  "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.

Read the full KIT documentation →