Divergence & Curl Calculator

JJ Ben-Joseph headshot JJ Ben-Joseph

Introduction: Divergence and Curl in a 3D Vector Field

This divergence and curl calculator evaluates how a three-dimensional vector field behaves at a single point. Divergence tells you whether the field is spreading outward or converging inward there, while curl tells you whether it has a local tendency to rotate around an axis. Together they provide a compact snapshot of source-like behavior, sink-like behavior, and swirling motion, which is why they show up so often in fluid mechanics, electromagnetism, and multivariable calculus.

You can think of a vector field F(x, y, z) as assigning a vector to every point in space, such as the velocity of a fluid, the flow of heat, or an electric or magnetic field. In this calculator, the field is written in Cartesian coordinates and split into its three components:

F(x, y, z) = (Fx(x, y, z), Fy(x, y, z), Fz(x, y, z))

Because the calculator differentiates the expressions symbolically before substituting the chosen point, the result reflects the local structure of your formulas rather than a rough finite-difference estimate.

Formulas for Divergence and Curl in Cartesian Coordinates

This calculator uses the standard partial-derivative formulas for divergence and curl in a Cartesian field, so the way you write each component directly controls what the derivative step sees.

Divergence ∇·F

For the divergence calculation, the tool adds the derivative of each component with respect to its matching coordinate: x for Fx, y for Fy, and z for Fz. That is what makes divergence a measure of local expansion or contraction around the chosen point.

∇·F = ∂Fx/∂x + ∂Fy/∂y + ∂Fz/∂z

F = ∂Fx ∂x + ∂Fy ∂y + ∂Fz ∂z

The result panel reports this scalar at your evaluation point, so you can read it as a source-like value, a sink-like value, or a neutral balance depending on the sign.

Curl ∇×F

For curl, the calculator forms cross-derivative differences, so each component compares how one part of the field changes in a perpendicular direction. That pattern is what makes curl especially sensitive to twisting, circulation, and local spin.

∇×F = ( ∂Fz/∂y − ∂Fy/∂z,  ∂Fx/∂z − ∂Fz/∂x,  ∂Fy/∂x − ∂Fx/∂y )

In a physical model, the curl vector points along the axis of local rotation and its magnitude shows how strong that rotation is at the point you picked.

How to Use the Divergence & Curl Calculator on a 3D Field

To use this divergence and curl calculator, enter three expressions for the vector-field components and then choose the single point where you want the derivatives evaluated.

  1. Enter the vector field components.
    • In Fx(x, y, z), type the x-component, e.g. x*y, y^2 + sin(z), or 3*x.
    • In Fy(x, y, z), type the y-component, e.g. y*z or cos(x).
    • In Fz(x, y, z), type the z-component, e.g. z*x or x^2 + y^2.

    Use x, y, and z as the variables. Supported syntax includes standard operators (+, −, *, /, ^) and common functions like sin, cos, exp, and log, so you can describe many textbook vector fields directly.

  2. Specify the evaluation point.
    • x0: the x-coordinate of the point, e.g. 1 or 0.5.
    • y0: the y-coordinate.
    • z0: the z-coordinate.

    The evaluation point tells the calculator where to substitute after differentiating, so x0, y0, and z0 should be the coordinates of the location you want to inspect.

  3. Click “Evaluate”.

    The tool differentiates each component symbolically with respect to x, y, and z, then substitutes the point (x0, y0, z0) to give numerical values for ∇·F and ∇×F.

Interpreting Divergence and Curl Results

When you run the divergence and curl calculator, the output gives you two different kinds of information about the same point in space: one scalar for divergence and one three-component vector for curl.

If a result seems surprising, look back at the expressions you entered. Terms that depend on the same variable as their own component usually feed divergence, while mixed-variable terms are often what create curl.

Worked Example: A Polynomial Vector Field

This worked example for the divergence and curl calculator uses a simple polynomial field whose derivatives are easy to check by hand. It is a good test case because each component depends on a different pair of variables, so the divergence and curl isolate different kinds of variation in the field.

Consider the vector field

F(x, y, z) = (x y,  y z,  z x)

Step 1: Compute the divergence:

So

∇·F = y + z + x

Step 2: Compute the curl components:

So

∇×F = ( −y,  −z,  −x )

Step 3: Evaluate at the point (1, 2, 3):

Entering fx = x*y, fy = y*z, fz = z*x and x0 = 1, y0 = 2, z0 = 3 into the calculator reproduces these values exactly, which makes the example a convenient sanity check for the symbolic differentiation step.

Comparison: Divergence vs Curl in Vector-Field Analysis

This comparison helps you read the two outputs that come back from the divergence and curl calculator. Divergence collapses the field behavior at a point into a single scalar, while curl returns a vector that tells you how the field tends to twist.

Aspect Divergence (∇·F) Curl (∇×F)
Type of quantity Scalar (single number) Vector (three components)
Geometric meaning Net outflow or inflow from a small volume Local rotation or swirling of the field
Typical interpretation in fluids Compressibility or sources/sinks of fluid Vorticity (how much the fluid spins)
Typical interpretation in electromagnetism Related to charge density (Gauss’s law) Related to changing fields and induction (Faraday’s law, Ampère’s law)
Zero value implies Solenoidal / incompressible behavior Irrotational field; often conservative (on simply connected domains)
Main operation Sum of normal components of the derivative Difference of mixed partial derivatives in cyclic order

In practice, the divergence value is the first number to check when you want a source-or-sink story, while the curl vector is the one to inspect when circulation, spin, or vorticity matters more than net expansion.

Assumptions and Limitations for Divergence and Curl

Related Vector Calculus Concepts for Divergence and Curl

Divergence and curl sit alongside other core operators in vector calculus, and they are easiest to understand when you compare them with the tools that transform or measure fields in different ways.

Using this divergence and curl calculator alongside gradient or flux tools can help build intuition for Maxwell’s equations, fluid flow problems, and the way local derivative information describes a field’s behavior at a point.

Enter the vector field and evaluation point to see the divergence and curl at that location.

Arcade Mini-Game: Divergence & Curl Calculator Calibration Run

Use this quick arcade run to practice separating the vector-field components from the evaluation point before you trust the divergence and curl output.

Score: 0 Timer: 30s Best: 0

Start the game, then use your pointer or arrow keys to catch useful field inputs and avoid bad assumptions about the derivatives.