Algebra • Complex Analysis & Polar Coordinates

Complex Logarithm Calculator

Evaluate principal complex logarithms Log(z) and multi-valued Riemann sheet branches for any nonzero complex number a + bi or r·e^(iθ), supporting custom bases and Argand plane visualization.

|
Last Updated: November 2026
|
Verified Accurate: Principal Branch & Euler Check
Examples:

Complex Number & Base

z != 0
Principal Log (k = 0)
1.609438 + 0.927295i
e^w = 3.000 + 4.000i
Polar Coordinates
|z| = 5
Arg(z) = 0.9273 rad (53.13 deg)
Riemann Sheet Branches (k = -2 to +2)

Argand Plane & Log Branch Visualization

Left: input z = r*e^(i*theta) on the unit/scaled circle. Right: vertical stack of w_k spaced by 2*pi/ln(b)

Direct Answer & Overview
Verified Educational Guide

Complex Logarithm Formula and Branch Structure

The logarithm of a nonzero complex number z = a + bi splits into a real magnitude component ln|z| plus an imaginary phase angle theta + 2πk radians: ln(z) = ln(sqrt(a² + b²)) + i(atan2(b, a) + 2πk). Setting k = 0 yields the unique Principal Value Log(z) with phase strictly inside (-π, π].

Primary Mathematical Formula Euler Polar Inversion & Multi-Valued Branch Formula
Standard Equation
ƒ(x)
Q.E.D.
ln⁡(z)=ln⁡∣z∣+i(Arg⁡(z)+2πk),log⁡b(z)=ln⁡∣z∣+i(Arg⁡(z)+2πk)ln⁡(b)\ln(z) = \ln|z| + i\bigl(\operatorname{Arg}(z) + 2\pi k\bigr), \qquad \log_b(z) = \frac{\ln|z| + i(\operatorname{Arg}(z) + 2\pi k)}{\ln(b)}
Solves rectangular (a + bi) and polar (r, theta) forms across bases e, 10, 2, or custom b
Exact Formula
Input Parameters
Required
1
Complex Number z != 0 — Rectangular pair (a, b) or polar pair (modulus r > 0, angle theta)
2
Base b & Branch k — Positive base b (default e) and integer sheet k ∈ {..., -1, 0, +1, ...}
Expected Outputs
Calculated
Principal Value Log(z) — Complex output w₀ = Re(w) + i·Im(w) verified via Euler reconstruction
Branch Family & Argand View — Stacked Riemann branches k = -2..+2 plotted alongside polar vector z
Worked Numerical Example
Instant Verification
Find the principal natural logarithm Log(3 + 4i) and ln(-1).
→ For 3 + 4i: |z| = 5, Arg(z) = atan2(4, 3) ≈ 0.927295 rad -> ln(5) ≈ 1.609438. For -1: |z| = 1, Arg(-1) = pi.
Result: Log(3 + 4i) ≈ 1.609438 + 0.927295i | Log(-1) = πi ≈ 3.141593i

Polar Representation, Euler’s Formula, and Complex Log Definition

While real logarithms halt at zero and negative inputs, extending into the two-dimensional complex plane C\mathbb{C} resolves every nonzero number smoothly through Leonhard Euler’s celebrated polar identity eiθ=cos⁡θ+isin⁡θe^{i\theta} = \cos\theta + i\sin\theta. Any nonzero point z=a+biz = a + bi sits at Euclidean distance r=∣z∣=a2+b2>0r = |z| = \sqrt{a^2 + b^2} > 0 from the origin and rotated counter-clockwise by angle θ=arg⁡(z)\theta = \arg(z)—a polar geometry also explored directly in our complex exponential form tool and general complex number calculator.

z=r ei(θ+2πk)  ⟹  ew=z  ⟺  w=ln⁡(r)+i(θ+2πk)(k∈Z)z = r\,e^{i(\theta + 2\pi k)} \implies e^w = z \iff w = \ln(r) + i(\theta + 2\pi k) \quad (k \in \mathbb{Z})

Separating real and imaginary equations proves why this works cleanly: matching magnitudes requires eRe⁡(w)=re^{\operatorname{Re}(w)} = r (whose unique real solution is Re⁡(w)=ln⁡∣z∣\operatorname{Re}(w) = \ln|z|), while matching unit directions requires Im⁡(w)=θ+2πk\operatorname{Im}(w) = \theta + 2\pi k because full circular rotations by 2π2\pi radians leave cosine and sine unchanged. For arbitrary positive bases b≠1b \neq 1, dividing by ln⁡(b)\ln(b) scales both components simultaneously: log⁡b(z)=ln⁡(z)/ln⁡(b)\log_b(z) = \ln(z) / \ln(b).

Principal Branch Arg(z), Branch Cuts, and Riemann Surfaces

Because adding any integer multiple of 2πi2\pi i gives another valid inverse of the complex exponential, the unrestricted complex logarithm is infinitely multi-valued. To define a single-valued holomorphic function across almost the entire complex plane, mathematicians select the Principal Value denoted with a capital L, restricting the angle strictly to the principal interval (−π,π](-\pi, \pi] computed by atan2(b, a):

Log⁡(z)=ln⁡∣z∣+iArg⁡(z),−π<Arg⁡(z)≤π\operatorname{Log}(z) = \ln|z| + i\operatorname{Arg}(z), \qquad -\pi < \operatorname{Arg}(z) \le \pi

The negative real ray (−∞,0](-\infty, 0] forms the standard branch cut: approaching −1-1 from the upper half-plane yields +πi+\pi i, whereas approaching −1-1 from just below the negative axis approaches −πi-\pi i, jumping abruptly by 2πi2\pi i. Imagine infinitely many spiral parking-garage ramps stacked vertically—each full counter-clockwise loop around the origin climbs smoothly up one 2πi2\pi i floor on the logarithmic Riemann surface!

Logarithms of Negative Reals, Imaginary Unit i, and i^i

Three classical mathematical gems drop out immediately once complex phase angles replace the real-line restriction:

Input z Polar (r, Arg) Principal Log(z) All Multi-Valued Branches
-1 r = 1, theta = pi i * pi ≈ 3.141593i i * pi * (1 + 2k)
i r = 1, theta = pi/2 i * pi/2 ≈ 1.570796i i * (pi/2 + 2*pi*k)
-i r = 1, theta = -pi/2 -i * pi/2 ≈ -1.570796i i * (-pi/2 + 2*pi*k)
-e² r = e², theta = pi 2 + i * pi 2 + i * pi * (1 + 2k)

Even more astonishing, evaluating ii=ei⋅ln⁡(i)i^i = e^{i \cdot \ln(i)} substitutes ln⁡(i)=i(π/2+2πk)\ln(i) = i(\pi/2 + 2\pi k) to give e−π/2−2πke^{-\pi/2 - 2\pi k}—an infinite family of purely real numbers whose principal value equals e−π/2≈0.2078796e^{-\pi/2} \approx 0.2078796!

Why log(z₁z₂) != log(z₁) + log(z₂) on the Principal Branch

On the positive real line, ln⁡(xy)=ln⁡(x)+ln⁡(y)\ln(xy) = \ln(x) + \ln(y) holds without exception. On the principal branch Log⁡(z)\operatorname{Log}(z), however, phase angles wrap around ±π\pm \pi modulo 2π2\pi, creating subtle discrepancies whenever angles add past π\pi! For example, set z1=z2=−1+iz_1 = z_2 = -1 + i (each having principal argument 3π/43\pi/4). Then Arg⁡(z1)+Arg⁡(z2)=3π/2\operatorname{Arg}(z_1) + \operatorname{Arg}(z_2) = 3\pi/2, whereas the product z1z2=−2iz_1 z_2 = -2i has principal argument −π/2-\pi/2—differing by −2πi-2\pi i! Thus, on the principal branch, product and quotient laws hold strictly modulo 2πi2\pi i (unlike the pure positive-real logarithm product rule).

Conformal Mapping, AC Impedance, and Quantum Phase Angles

Fluid Flow & Electrostatics

Complex potential Ω(z)=Q2πln⁡(z)\Omega(z) = \frac{Q}{2\pi}\ln(z) maps concentric rings around a line source cleanly onto horizontal strips, making ln⁡∣z∣\ln|z| potential equipotentials and arg⁡(z)\arg(z) radial streamlines.

RF Transmission Lines & Attenuation

Evaluating the complex propagation constant γ=α+iβ=ln⁡(V0/VL)/L\gamma = \alpha + i\beta = \ln(V_0 / V_L)/L extracts both signal decay α\alpha in Nepers/m and phase delay β\beta in radians/m directly from complex voltage phasors.

Step-by-Step Worked Complex Logarithm Examples

Example 1: Quadrant III Complex Number z = -1 − √3 i

Compute ∣z∣=(−1)2+(−3)2=4=2|z| = \sqrt{(-1)^2 + (-\sqrt{3})^2} = \sqrt{4} = 2. Since both real and imaginary parts are negative in Quadrant III, atan2(-sqrt(3), -1) gives principal angle −2π/3≈−2.094395-2\pi/3 \approx -2.094395 rad (−120∘-120^\circ). Hence Log⁡(−1−3i)=ln⁡(2)−i2π3≈0.693147−2.094395i\operatorname{Log}(-1 - \sqrt{3}i) = \ln(2) - i\frac{2\pi}{3} \approx 0.693147 - 2.094395i.

Example 2: Base-10 Logarithm log₁₀(-100)

Here ∣−100∣=100|-100| = 100 and Arg⁡(−100)=π\operatorname{Arg}(-100) = \pi. Converting base yields log⁡10(−100)=ln⁡(100)+iπln⁡(10)=2+πln⁡(10)i≈2+1.364376i\log_{10}(-100) = \frac{\ln(100) + i\pi}{\ln(10)} = 2 + \frac{\pi}{\ln(10)}i \approx 2 + 1.364376i.

Common Mistakes with Complex Arguments and Angles

  • Using atan(b / a) instead of quadrant-aware atan2(b, a): Plain arctangent returns values inside (−π/2,π/2)(-\pi/2, \pi/2), missing Quadrant II and Quadrant III points (like −1+i-1 + i or −3−4i-3 - 4i) by 180 degrees!
  • Measuring theta in degrees inside ln(r) + i·theta: Euler’s formula eiθe^{i\theta} requires radians strictly; plugging degrees directly into the imaginary part produces wrong exponential checks.
  • Assuming real power laws commute unconditionally: Naive cancellations like ln⁡((−1)2)=2ln⁡(−1)\ln((-1)^2) = 2\ln(-1) break down on principal branches because Log⁡(1)=0≠2πi\operatorname{Log}(1) = 0 \neq 2\pi i.

Computational Accuracy and Argand Plane Plotting

All complex logarithmic moduli, quadrant-exact principal angles via Math.atan2, multi-sheet branches across k∈[−2,+2]k \in [-2, +2] (or any custom integer sheet), and complex Euler inverse reconstructions bwb^w run instantaneously inside your browser and plot dynamically on a dual HTML5 <canvas> Argand/branch diagram. For purely real logs without complex phase angles, return to our real logarithm calculator.

Fact-Checked & Verified • Computational Accuracy Standards
Updated November 2026 • Editorial Policy
Authored By
Sanjay Samanta

Lead Developer & Founder of Basic Math Tools. Specializes in browser-native computational algorithms and applied mathematics.

Reviewed & Verified By
Academic Review Board

Mathematics & curriculum specialists. Audited against standard algebraic and arithmetic principles.

Found an error or have an improvement suggestion? Report a calculation issue

Frequently Asked Questions

What is the logarithm of a complex number?
For any nonzero complex number z = a + bi written in polar form z = r·e^(i·theta) with modulus r = sqrt(a² + b²) > 0 and argument theta = atan2(b, a), the natural complex logarithm is ln(z) = ln(r) + i(theta + 2πk) for any integer branch k ∈ Z.
What is ln(-1) and why does Euler’s identity give i*pi?
Since -1 lies at distance r = 1 from the origin at angle theta = pi radians (180 degrees) along the negative real axis, its principal complex logarithm is Log(-1) = ln(1) + i·pi = i·pi (and multi-valued branches are i(pi + 2πk) for any integer k).
Why is the complex logarithm multi-valued across integers k?
Because the complex exponential function is periodic with period 2πi (e^(w + 2πik) = e^w · 1 = e^w), infinitely many complex numbers w differing by integer multiples of 2πi map back onto the exact same z when exponentiated.
What is the Principal Value Log(z) vs multi-valued log(z)?
Setting branch index k = 0 and choosing the principal argument Arg(z) strictly inside (-π, π] selects the Principal Value of the complex logarithm, written capitalized as Log(z) = ln|z| + i·Arg(z), with a branch cut along the negative real axis.
What is the logarithm of a pure imaginary number like i?
Because i = 1 · e^(i·pi/2) sits at modulus 1 and angle +pi/2 radians (90 degrees), its principal natural logarithm is Log(i) = ln(1) + i(pi/2) = i·pi/2 ≈ 1.570796i.
Can you evaluate complex logarithms in base 10 or arbitrary base b?
Yes. By the complex change-of-base identity, log_b(z) = (ln|z| + i(Arg(z) + 2πk)) / ln(b) for any positive real base b != 1. For instance, log₁₀(-100) = (ln(100) + i·pi) / ln(10) = 2 + 1.364376i.
Why is log(0) still undefined even in complex analysis?
At z = 0, modulus |z| = 0 so the real part ln|z| diverges toward -infinity and the phase angle theta is completely indeterminate. The origin z = 0 is an essential logarithmic branch point.
How does the complex logarithm compute complex powers like i^i?
Complex exponentiation is defined via the complex logarithm as a^c = exp(c · log(a)). Setting a = i and c = i gives principal value exp(i · (i·pi/2)) = exp(-pi/2) ≈ 0.207880—a purely real number!