Since 2010 · Powering 2M+ tool runs every month
Since 2010
Add to Chrome

My Toolbox

Automatic Mode

No saved tools yet.

Go Premium
Related tools
Next step
Curl Calculator
More tools
Line Integral CalculatorDirectional Derivative CalculatorSurface Integral CalculatorDerivative CalculatorGradient Calculator (Multivariable)Triple Integral Calculator
Home Page > Math > Calculus

Divergence Calculator

Inspect sources and sinks in MiniWebtool’s Divergence Calculator. Components of a 2D or 3D vector field yield symbolic ∇·F and optional point evaluation, with derivative steps and a 2D flow visualization.

Need help using this tool? Ask AI

For Gemini, paste the copied question into the chat. You can also copy it below.

View the question

3 free uses dailyNo sign-up requiredInstant Results
Divergence CalculatorTry it now — free ▼
Divergence is outflow: ∂P/∂x + ∂Q/∂y is 2 for ⟨x, y⟩, 0 for ⟨−y, x⟩

Enter the components of a 2D or 3D vector field and an optional point to get the divergence, with the partial derivatives step by step.

Examples:
P = F₁(x,y)
Q = F₂(x,y)
Comma-separated coordinates matching the dimension
DIVERGENCE PREVIEW
Enter P and Q to preview

Embed Divergence Calculator Widget

About Divergence Calculator

The Divergence Calculator computes the divergence ∇·F of any 2D or 3D vector field with full step-by-step partial derivative computation. Enter your vector field components P, Q (and R for 3D), optionally evaluate at a specific point, and get the symbolic divergence, source/sink classification, and for 2D fields, an interactive visualization with a divergence heat map and animated particle flow.

At a Glance

Divergence Calculator computes the divergence of a 2D or 3D vector field from its component functions. It gives the symbolic result with partial-derivative steps and can classify a chosen point as a source, sink or neither.

Divergence Calculator: features at a glance
FeatureWhat you getGood for
2D and 3D fieldsToggle between F = (P, Q) and F = (P, Q, R) and type each component in terms of x, y and z.Vector calculus and physics coursework
Function syntaxUse ^ for powers, * for multiplication, sin, cos, exp, ln and sqrt. Implicit multiplication such as 2x is read as 2*x.Typing fields the way they appear in a textbook
Symbolic divergenceReturns the divergence as the sum of the partial derivatives, with each derivative step shown.Checking a hand calculation of the divergence
Evaluation pointEnter optional coordinates to get a numeric value and a classification as source, sink or incompressible at that point.Deciding whether a field expands or contracts at a location
2D flow viewFor 2D fields, vector arrows sit over a heat map (red for source, blue for sink) with animated particle flow.Seeing the behavior of the field, not just the formula
Example fieldsButtons load fields such as source, sink and rotation, plus x^2y, xy^2, a 3D example and a sin-cos example.Starting from a standard field

What Is Divergence?

The divergence of a vector field \(\mathbf{F}\) is a scalar-valued operator that measures the rate at which the field "spreads out" from a point. For a 3D vector field \(\mathbf{F} = \langle P, Q, R \rangle\):

$$\nabla \cdot \mathbf{F} = \frac{\partial P}{\partial x} + \frac{\partial Q}{\partial y} + \frac{\partial R}{\partial z}$$

For a 2D field \(\mathbf{F} = \langle P, Q \rangle\), the divergence is \(\frac{\partial P}{\partial x} + \frac{\partial Q}{\partial y}\). Divergence is a fundamental concept in vector calculus, fluid dynamics, electromagnetism, and differential equations.

Physical Meaning of Divergence

🔴
Source (∇·F > 0)
Fluid flows outward — more leaving than entering. Like water gushing from a fountain.
🔵
Sink (∇·F < 0)
Fluid flows inward — more entering than leaving. Like water draining into a hole.
🟢
Zero (∇·F = 0)
Incompressible flow — what enters equals what leaves. The field is solenoidal.
🔄
Divergence Theorem
Total divergence inside a volume equals the net flux through its boundary surface.

Divergence Formulas and Coordinate Systems

Divergence Calculator: Divergence Formulas and Coordinate Systems
Coordinate SystemDivergence Formula
Cartesian 2D\(\nabla \cdot \mathbf{F} = \frac{\partial P}{\partial x} + \frac{\partial Q}{\partial y}\)
Cartesian 3D\(\nabla \cdot \mathbf{F} = \frac{\partial P}{\partial x} + \frac{\partial Q}{\partial y} + \frac{\partial R}{\partial z}\)
Cylindrical\(\nabla \cdot \mathbf{F} = \frac{1}{r}\frac{\partial(rF_r)}{\partial r} + \frac{1}{r}\frac{\partial F_\theta}{\partial \theta} + \frac{\partial F_z}{\partial z}\)
Spherical\(\nabla \cdot \mathbf{F} = \frac{1}{r^2}\frac{\partial(r^2 F_r)}{\partial r} + \frac{1}{r\sin\theta}\frac{\partial(\sin\theta\, F_\theta)}{\partial \theta} + \frac{1}{r\sin\theta}\frac{\partial F_\phi}{\partial \phi}\)

Important Identities Involving Divergence

Divergence Calculator: Important Identities Involving Divergence
IdentityFormula
Linearity\(\nabla \cdot (a\mathbf{F} + b\mathbf{G}) = a(\nabla \cdot \mathbf{F}) + b(\nabla \cdot \mathbf{G})\)
Product rule (scalar × vector)\(\nabla \cdot (f\mathbf{F}) = f(\nabla \cdot \mathbf{F}) + \mathbf{F} \cdot (\nabla f)\)
Curl of gradient\(\nabla \cdot (\nabla \times \mathbf{F}) = 0\) (always)
Laplacian\(\nabla \cdot (\nabla f) = \nabla^2 f\) (divergence of gradient = Laplacian)
Divergence theorem\(\displaystyle\iiint_V (\nabla \cdot \mathbf{F})\,dV = \unicode{x222F}_S \mathbf{F} \cdot d\mathbf{S}\)

Applications of Divergence

Divergence Calculator: Applications of Divergence
FieldApplicationWhat Divergence Represents
ElectromagnetismGauss's Law\(\nabla \cdot \mathbf{E} = \rho/\varepsilon_0\) — charge density creates electric field divergence
ElectromagnetismMagnetic field\(\nabla \cdot \mathbf{B} = 0\) — no magnetic monopoles exist
Fluid DynamicsContinuity equation\(\nabla \cdot \mathbf{v} = 0\) for incompressible flow
Heat TransferHeat equationDivergence of heat flux relates to temperature change
General RelativityEinstein field equationsDivergence-free condition on stress-energy tensor

How to Use the Divergence Calculator

  1. Choose dimension: Select 2D for fields F = ⟨P, Q⟩ or 3D for F = ⟨P, Q, R⟩ using the toggle buttons.
  2. Enter component functions: Type each component function (P, Q, and optionally R) using standard notation. Use ^ for exponents, * for multiplication, and functions like sin(x), cos(y), exp(x), ln(x), sqrt(x). Implicit multiplication is supported (e.g., 2x = 2*x).
  3. Enter an evaluation point (optional): Provide comma-separated coordinates to evaluate the divergence numerically and classify the point as a source, sink, or incompressible.
  4. Click Compute Divergence: View the symbolic divergence formula, step-by-step partial derivative computation, numerical evaluation, and source/sink classification.
  5. Explore the visualization: For 2D fields, view the vector field arrows with a color-coded divergence heat map (red = source, blue = sink) and animated particle flow showing the field behavior.

Worked Example

Find the divergence of \(\mathbf{F}(x, y) = \langle x, y \rangle\) at the point \((1, 1)\):

Step 1: Identify components: \(P = x\), \(Q = y\).

Step 2: Compute partial derivatives: \(\frac{\partial P}{\partial x} = 1\), \(\frac{\partial Q}{\partial y} = 1\).

Step 3: Sum them: \(\nabla \cdot \mathbf{F} = 1 + 1 = 2\).

Interpretation: Since \(\nabla \cdot \mathbf{F} = 2 > 0\), every point is a source. The field uniformly expands outward — imagine fluid being pumped out everywhere in the plane.

FAQ

What is divergence of a vector field?
Divergence is a scalar-valued differential operator that measures the rate at which a vector field expands or contracts at a given point. For a 3D field F = (P, Q, R), the divergence is the sum of partial derivatives: ∇·F = ∂P/∂x + ∂Q/∂y + ∂R/∂z. Positive divergence indicates a source (outward flow), negative indicates a sink (inward flow), and zero means incompressible flow.
How do you calculate divergence?
To calculate divergence, take the partial derivative of each component function with respect to its corresponding variable, then sum them all up. For a 2D field F = (P, Q), compute ∂P/∂x + ∂Q/∂y. For 3D, add ∂R/∂z. The result is a scalar function (not a vector), which tells you how much the field is expanding or compressing at each point.
What does it mean when divergence is zero?
When the divergence is zero everywhere, the vector field is called solenoidal or divergence-free. In fluid dynamics, this means the fluid is incompressible — there is no net expansion or contraction at any point. Magnetic fields always have zero divergence (Gauss's law for magnetism: ∇·B = 0), and the curl of any vector field is always divergence-free (∇·(∇×F) = 0).
What is the physical meaning of divergence?
Physically, divergence measures the net outward flux per unit volume at a point. Imagine a tiny box in a fluid: if more fluid leaves the box than enters, the divergence is positive (source). If more enters than leaves, it's negative (sink). This concept is central to conservation laws in physics, appearing in the continuity equation, Maxwell's equations, and the heat equation.
What is the difference between divergence and curl?
Divergence and curl are both differential operators on vector fields, but they measure different things. Divergence (∇·F) measures expansion or contraction and produces a scalar. Curl (∇×F) measures rotation or circulation and produces a vector. A field can have nonzero divergence but zero curl (like F = (x, y)), or zero divergence but nonzero curl (like F = (−y, x)), or both, or neither.

Reference this content, page, or tool as:

"Divergence Calculator" at https://MiniWebtool.com/divergence-calculator/ from MiniWebtool, https://MiniWebtool.com/

by miniwebtool team. Updated: 2026-04-08

Chat with your favorite AI

For Gemini, paste the copied question into the chat. You can also copy it below.

View the question

Calculus:

Math SolverWhat would you like to solve?

Math Solver

Try
Browse expression examples

Choose an example to fill the input, edit its numbers, then Solve. log uses base 10; use ln for the natural logarithm.

Numbers & factors

Fractions & division

Powers, roots & logs

Algebra & equations

Calculus

Geometry & trigonometry

Top & Updated:

Curvature CalculatorDouble Integral CalculatorImplicit Derivative CalculatorView all →
Home Page > Math > Calculus > Divergence Calculator