Divergence & Curl Calculator

JJ Ben-Joseph headshot JJ Ben-Joseph

Overview: Divergence and Curl of a Vector Field

This tool computes the divergence and curl of a three-dimensional vector field at a specific point. In vector calculus and multivariable calculus, these two differential operators help you understand how a field expands, compresses, and rotates in space. They are central in physics, engineering, and applied mathematics, especially in areas like fluid dynamics and electromagnetism.

You can think of a vector field F(x, y, z) as assigning a vector to every point in 3D space, for example a velocity vector of a fluid, or the electric or magnetic field in Maxwell’s equations. The calculator assumes a Cartesian coordinate system and a field of the form:

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

Formulas for Divergence and Curl

The divergence and curl are defined using partial derivatives of the components of F with respect to x, y, and z.

Divergence ∇·F

The divergence measures the net outflow of the vector field from an infinitesimal volume around a point. In Cartesian coordinates:

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

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

Curl ∇×F

The curl measures the local rotation or swirling of the field. In Cartesian coordinates the curl is another vector field whose components are:

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

Physically, the direction of the curl vector indicates the axis of rotation, and its magnitude indicates how strong that local rotation is.

How to Use the Divergence & Curl Calculator

  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.

  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 calculator evaluates the divergence and curl at this single point in space.

  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 the Results

The output will show:

Typical interpretations in vector calculus and physics are:

Worked Example

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 will reproduce these results.

Comparison: Divergence vs Curl

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

Assumptions and Limitations

Related Vector Calculus Concepts

Divergence and curl sit alongside other core operators in vector calculus:

Using this divergence and curl calculator alongside gradient or flux tools can help build intuition for Maxwell’s equations, fluid flow problems, and many other topics in multivariable calculus.

Enter the field and point.

Embed this calculator

Copy and paste the HTML below to add the Divergence and Curl Calculator - Analyze Vector Fields to your website.