Divergence Calculator

Find the divergence of a 3D vector field with monomial components.
Enter P(x), Q(y), R(z) coefficients and evaluation point to get the scalar result.

Divergence

Divergence measures how much a vector field “spreads out” from a point. Positive divergence means the field acts like a source — fluid flows outward. Negative divergence means it acts like a sink — fluid flows inward. Zero divergence means incompressible flow: what enters a region also exits it.

For a 3D vector field F = (P, Q, R), the divergence is:

div F = dP/dx + dQ/dy + dR/dz

This calculator uses component functions that depend on a single variable each: P(x) = ax^m, Q(y) = by^n, R(z) = cz^r. The partial derivatives are:

dP/dx = max^(m-1), dQ/dy = nby^(n-1), dR/dz = rcz^(r-1)

Sum those three values at your evaluation point (x0, y0, z0) to get the scalar divergence.

Worked example: F = (2x^2, 3y, z^3) at point (1, 2, 1). Here a=2, m=2, b=3, n=1, c=1, r=3. dP/dx = 4x = 4(1) = 4 dQ/dy = 3 (constant for linear Q) dR/dz = 3z^2 = 3(1) = 3 div F = 4 + 3 + 3 = 10

The positive divergence of 10 at this point means the field is expanding outward — acting as a source here.

The divergence theorem says the total divergence inside a closed region equals the net flux through its surface. This is how Gauss’s law in electromagnetism relates the charge inside a surface to the electric field passing through it.

For vector fields with cross-terms (P depending on y and z as well as x), you need the partial derivatives of those cross-terms. The curl calculator on this site handles linear fields with all nine coefficients.


How we build and check this calculator

This calculator runs entirely in your browser, so the numbers you enter stay on your device. The math behind it is written by hand and tested against worked examples and standard references before the page goes live.

SuperGlobalCalculator is independently built and maintained. See how we build and verify our calculators.

Embed This Calculator

Copy the code below and paste it into your website or blog.
The calculator will work directly on your page.