Divergence Calculator screenshot

Divergence Calculator

Compute div F = ∂P/∂x + ∂Q/∂y + ∂R/∂z for a three-component vector field, symbolically and at a point.

Privacy First
0 Runs
Updated 2026-11-22
Runs in your browser
No sign-up, no upload
Symbolic derivatives

Divergence Calculator

Compute div F = ∂P/∂x + ∂Q/∂y + ∂R/∂z for a three-component vector field, symbolically and at a point.

How this page computes

Divergence is a scalar: one partial derivative per component, added together. The page parses three expressions, differentiates P in x, Q in y and R in z, and prints each derivative beside the sum.

On F = (x^2, y^2, z^2) the three terms are 2·x, 2·y and 2·z, so at (1, 1, 1) the divergence is 6. A component that uses a name other than x, y or z is refused by name.

The page computes the trace of the Jacobian, which is the definition of divergence, rather than a numerical flux through a small box.

The calculation runs entirely in this browser tab; nothing is uploaded.

Divergence measures how much a vector field spreads out from a point. The page takes a three-component field, differentiates each component in its own coordinate, and adds the three results: for (x^2, y^2, z^2) at (1, 1, 1) the answer is 6.

The page prints the three partial derivatives as formulas before the sum, so a sign error is visible in one term rather than hidden in a total. Every derivative is symbolic and the point value is a substitution.

How to use Divergence Calculator

Type the three components P, Q and R on separate lines. Line 1 is the x component, line 2 the y component, line 3 the z component.

Set the point (x0, y0, z0) and press Run.

Read ∂P/∂x, ∂Q/∂y and ∂R/∂z, then the divergence line, which is their sum at the point.

How the method works

Divergence is the trace of the Jacobian matrix: the diagonal entries are each component's derivative in its own coordinate, and their sum is the local expansion rate. Printing the three terms makes that structure explicit.

A positive divergence at a point means the field is a source there, a negative one means a sink, and zero means the field is solenoidal to first order. The page prints the number, and the three terms show which component supplies it.

What to Expect

Best for

  • div F for a field of three elementary expressions
  • Seeing each diagonal term of the Jacobian
  • Checking the sign of a source or sink

Not ideal for

  • Curl, which is a different operator
  • A field given as a table of samples
  • Components that use variables other than x, y and z

What this tool keeps

  • All three components exactly as typed

What may need cleanup

  • Nothing: the divergence is the final answer

Common errors

  • Fewer or more than three components is refused with the count
  • A component using another name is refused by name
  • A non-finite term at the point is refused

Example use cases

  • div (x^2, y^2, z^2) at (1, 1, 1)
  • Show that (y, -x, 0) is divergence-free
  • Find which component makes a field a source

Sample input

F = (x^2, y^2, z^2) at (1, 1, 1)

Sample output

∂P/∂x = 2·x, ∂Q/∂y = 2·y, ∂R/∂z = 2·z, and div F = 6

Who this is for

  • Students meeting vector calculus
  • Readers checking a fluid or field model

Frequently asked questions

Why three components and not two?

Divergence is defined on a vector field in the same number of dimensions as its components. This page works in three dimensions, so it needs P, Q and R. The two-dimensional case is a special case with R = 0.

What does a divergence of zero mean?

The field has no local source or sink at that point: what flows in also flows out to first order. A rotational field such as (y, -x, 0) has zero divergence everywhere.

Is divergence the same as the gradient?

No. The gradient takes a scalar to a vector; divergence takes a vector to a scalar. They are different operators that happen to use the same partial derivatives.

Developer program

Build custom tools for your store

Join the SDK program to create useful ecommerce utilities for your store.