Divergence Calculator

Enter the three components of your vector field F(x, y, z)Fx, Fy, and Fz — as expressions in x, y, and z, and this Divergence Calculator computes the divergence (∇·F) by summing the partial derivatives ∂Fx/∂x + ∂Fy/∂y + ∂Fz/∂z. Optionally provide a point (x₀, y₀, z₀) to evaluate the divergence at a specific location. Results include the symbolic divergence expression and its numeric value at the given point.

Enter the x-component as an expression in x, y, z. Supported: +, -, *, /, ^, sin, cos, exp, ln.

Enter the y-component as an expression in x, y, z.

Enter the z-component as an expression in x, y, z.

Optional: enter a numeric value to evaluate the divergence at a specific point.

Results

Divergence at Point (x₀, y₀, z₀)

--

∂Fx/∂x at Point

--

∂Fy/∂y at Point

--

∂Fz/∂z at Point

--

Partial Derivative Contributions to Divergence

Frequently Asked Questions

What is divergence in vector calculus?

Divergence is a scalar operator that measures how much a vector field spreads out (or converges) at a given point. For a 3D vector field F = (Fx, Fy, Fz), the divergence is ∇·F = ∂Fx/∂x + ∂Fy/∂y + ∂Fz/∂z. A positive divergence indicates a source, a negative divergence indicates a sink, and zero divergence means the field is incompressible.

How does this Divergence Calculator compute the result?

The calculator takes your three vector field component expressions Fx, Fy, Fz, numerically approximates the partial derivatives using finite differences (∂f/∂x ≈ [f(x+h,y,z) − f(x−h,y,z)] / 2h), and then sums them to produce the divergence. When you supply an evaluation point (x₀, y₀, z₀), the result is the numeric divergence at that specific location.

What expressions are supported in the input fields?

You can use standard mathematical expressions including addition (+), subtraction (−), multiplication (*), division (/), exponentiation (^), and common functions like sin(), cos(), tan(), exp(), ln(), sqrt(), and abs(). Variables must be written as x, y, and z.

What does it mean when the divergence is zero?

A divergence of zero means the vector field is divergence-free, or solenoidal. This is physically significant in fluid dynamics (incompressible flow) and electromagnetism — for example, Maxwell's equations state that the divergence of the magnetic field B is always zero.

Can I compute the divergence of a 2D vector field?

Yes. For a 2D field F = (Fx, Fy), simply enter 0 for the Fz component. The calculator will compute ∂Fx/∂x + ∂Fy/∂y + 0, giving you the correct 2D divergence.

What is the physical interpretation of divergence?

In fluid mechanics, divergence of a velocity field at a point represents the rate of volume expansion (or compression) of fluid per unit volume. In electrostatics, Gauss's law states that the divergence of the electric field equals the charge density divided by permittivity (∇·E = ρ/ε₀), linking field sources directly to charge distributions.

How accurate is the numeric differentiation used here?

The calculator uses central difference approximation with a small step h = 1×10⁻⁵, which typically yields accuracy to 8–10 significant figures for smooth functions. For highly oscillatory or discontinuous expressions, slight numerical errors may appear — in those cases, symbolic differentiation tools are recommended.

What is the difference between divergence and curl?

Divergence (∇·F) is a scalar that measures field expansion or compression at a point. Curl (∇×F) is a vector that measures the rotation or circulation of the field around a point. Both are important differential operators in vector calculus, but they describe fundamentally different geometric properties of a vector field.

More Math Tools