Calculus, Linear Algebra & Discrete Math Multivariable & Vector Calculus Vector calculus: ∇ × F and the conservative field criterion

Curl of a Vector Field Calculator

Enter the three components of a vector field and a point, and this calculator evaluates curl F = ∇ × F there, showing each of the six partial derivatives that go into it. It reports the magnitude of the curl, decides whether the field is irrotational to within numerical tolerance, and when it is, computes a scalar potential at your point by integrating the field along a straight path from the origin. All partial derivatives are Richardson-extrapolated central differences, so they are accurate to roughly twelve significant figures for a smooth field.

Calculator

This calculator runs in your browser. Enable JavaScript for live results — the inputs, formula and worked example below remain fully readable without it.

Inputs this calculator takes, with typical values
InputWhat to enterExample
F₁ (the x-component)Use x, y and z as the variables. Available: + - * / ^, sin, cos, exp, ln, sqrt, abs, pi, e.-y
F₂ (the y-component)The second component of the field. Enter 0 for a two-dimensional field.x
F₃ (the z-component)The third component. A planar field has F₃ = 0 and no dependence on z.0
x at the evaluation pointThe point at which the curl is evaluated.1
y at the evaluation pointThe y-coordinate of the same point.1
z at the evaluation pointThe z-coordinate. Leave at 0 for a planar problem.0

It returns

  • |curl F| at the point — Zero to within tolerance means the field is irrotational there.
  • x-component: ∂F₃/∂y − ∂F₂/∂z
  • y-component: ∂F₁/∂z − ∂F₃/∂x
  • z-component: ∂F₂/∂x − ∂F₁/∂y
  • Scalar potential φ at the point — Taken with φ = 0 at the origin, and reported only when the curl vanishes.
  • |F| at the point

The formula

×F=(F3yF2z,F1zF3x,F2xF1y)
×F=0F=φ
×(φ)=0

In plain text: curl F = ∇ × F = (∂F₃/∂y − ∂F₂/∂z, ∂F₁/∂z − ∂F₃/∂x, ∂F₂/∂x − ∂F₁/∂y)

  • FThe vector field, with components F₁, F₂ and F₃
  • The del operator, (∂/∂x, ∂/∂y, ∂/∂z)
  • curl FA vector field measuring the local rotation of F
  • φA scalar potential, when one exists: F = ∇φ

The formula is the formal determinant of the 3×3 array whose rows are the unit vectors, the del components and the field components — which is why it is written ∇ × F.

Updated Category Multivariable & Vector Calculus Verified against published test cases Reading time 12 min

What the curl measures

The curl of a vector field is a vector that describes the local rotation of the field. Put a tiny paddle wheel into a flow at a point; the curl points along the axis the wheel spins about, by the right-hand rule, and its magnitude is twice the angular velocity of that spin. A field can be curling globally and have zero curl locally, and it can look straight and still have a large curl — both facts surprise people, and both are worth checking against the calculator.

The clearest example of the first is the field F = (−y, x, 0), the default here. It describes rigid rotation about the z-axis, and its curl is the constant vector (0, 0, 2): every paddle wheel in the plane spins at the same rate, including one at the origin. The clearest example of the second is the shear F = (y, 0, 0), whose arrows all point along x and never curve — yet its curl is (0, 0, −1), because the flow is faster at higher y and a paddle wheel put into it turns.

Curl matters most because of what a vanishing curl implies. If curl F = 0 throughout a simply connected region, then F is the gradient of a scalar potential, the work done moving along a path between two points depends only on the endpoints, and every closed-loop line integral vanishes. That single equivalence is the backbone of conservative force fields in mechanics, of electrostatics, and of the whole theory of exact differential equations.

The formula, the determinant mnemonic and the numerics

Each component of the curl is a difference of two cross partial derivatives, and the pattern cycles: the x-component uses ∂F₃/∂y − ∂F₂/∂z, and the other two follow by advancing every index. The standard mnemonic writes it as the determinant of a 3×3 array whose first row is the unit vectors, whose second row is ∂/∂x, ∂/∂y, ∂/∂z, and whose third row is F₁, F₂, F₃. Expanding along the first row reproduces the three components exactly, with the middle one carrying the minus sign that the cofactor expansion supplies — which is why the y-component reads ∂F₁/∂z − ∂F₃/∂x rather than the other way round. That sign is the single most common slip in hand calculations.

For a planar field with F₃ = 0 and no z-dependence, four of the six partial derivatives vanish and only the z-component survives: curl F = (0, 0, ∂F₂/∂x − ∂F₁/∂y). That scalar is what two-dimensional treatments call "the curl", and it is also exactly the integrand of Green's theorem.

This calculator obtains each partial derivative by a central difference in one coordinate at a time, at a step of 10⁻⁴ scaled to the size of that coordinate, then Richardson-extrapolates a pair of them to fourth-order accuracy. For a smooth field that gives about twelve significant figures. A curl that is genuinely zero therefore appears as a residue near 10⁻¹¹ rather than as an exact zero, and the irrotational verdict uses a tolerance scaled to the largest partial derivative present so the test does not become meaningless for a field with very large or very small gradients.

When the curl vanishes, the potential is constructed by the standard route: integrate F·dr along the straight segment from the origin to your point, parametrised as r(t) = tP for t from 0 to 1, so the integrand is F(tP)·P. The result is the potential normalised to zero at the origin. Any other constant would do equally well, which is what "potential is unique up to a constant" means.

Worked example: F = (yz, xz, xy)

Work all six partial derivatives, then the three components.

  1. x-component. ∂F₃/∂y = ∂(xy)/∂y = x and ∂F₂/∂z = ∂(xz)/∂z = x. Their difference is x − x = 0.
  2. y-component. ∂F₁/∂z = ∂(yz)/∂z = y and ∂F₃/∂x = ∂(xy)/∂x = y. Difference y − y = 0.
  3. z-component. ∂F₂/∂x = ∂(xz)/∂x = z and ∂F₁/∂y = ∂(yz)/∂y = z. Difference z − z = 0.
  4. Conclude. curl F = (0, 0, 0) everywhere, so the field is irrotational on all of space, which is simply connected. A potential therefore exists.
  5. Find the potential. Guess φ = xyz and check: ∇φ = (yz, xz, xy) = F. Correct.
  6. Confirm by the line integral. Along r(t) = t(1, 2, 3), the field is F(tP) = (t²·2·3, t²·1·3, t²·1·2) = t²(6, 3, 2), so F·P = t²(6·1 + 3·2 + 2·3) = 18t². Then φ = ∫₀¹18t²dt = 6. And directly, φ(1,2,3) = 1·2·3 = 6. They agree.

Contrast the default field F = (−y, x, 0). Here ∂F₂/∂x = 1 and ∂F₁/∂y = −1, so the z-component is 1 − (−1) = 2. The two terms have opposite signs, so they add rather than cancel — that is the whole difference between a rotating field and a conservative one. Because the curl is non-zero, no potential exists, and indeed the circulation of this field once round the unit circle is , not zero. Stokes' theorem confirms the number: the circulation equals the flux of the curl through the enclosed disc, 2 × π(1)² = 2π.

Reading the result

Start with the magnitude. A value at the level of 10⁻¹⁰ or below, against partial derivatives of order 1, is numerically zero and the field is irrotational at that point. A value comparable with the partial derivatives themselves is a real rotation. The middle ground is rare with the fourth-order differencing used here, and when it happens the field usually has a large higher derivative at the point.

Then read the direction. The curl vector is the axis of local rotation, oriented by the right hand: curl the fingers of your right hand in the sense the field turns, and the thumb points along the curl. A curl of (0, 0, 2) means anticlockwise rotation in the xy-plane seen from positive z; (0, 0, −2) is the same rate the other way. Magnitude is twice the angular velocity, so a curl magnitude of 2 corresponds to a paddle wheel turning at 1 radian per unit time.

A vanishing curl at one point is not enough to call a field conservative. The condition must hold throughout a region, and the region must be simply connected — every closed loop contractible to a point without leaving it. The standard counterexample is F = (−y/(x²+y²), x/(x²+y²), 0), whose curl is zero everywhere it is defined, yet whose circulation around any loop enclosing the z-axis is . The field is not defined on the axis, so its domain has a hole, and the implication fails. This calculator reports the curl at a point and says what it implies; it cannot check the topology of your domain for you.

The potential figure, when shown, is normalised to zero at the origin. What is physically meaningful is a difference of potentials, and the work done by the field along any path from A to B is φ(B) − φ(A). Run the calculator at two points and subtract.

Reference: curl of standard vector fields

Each result is obtained by hand from the definition; all are reproducible above.
Field Fcurl FConservative?Potential φ
(c₁, c₂, c₃) constant(0, 0, 0)Yesc₁x + c₂y + c₃z
(x, y, z)(0, 0, 0)Yes(x² + y² + z²)/2
(yz, xz, xy)(0, 0, 0)Yesxyz
(−y, x, 0)(0, 0, 2)Nonone
(y, −x, 0)(0, 0, −2)Nonone
(y, 0, 0) shear(0, 0, −1)Nonone
(0, 0, y)(1, 0, 0)Nonone
(−y, x, 0)/(x²+y²)(0, 0, 0) where definedLocally, but not globallythe polar angle θ, multivalued

The last row is the standard counterexample to "zero curl implies conservative": its domain excludes the z-axis and is therefore not simply connected, so the implication does not apply even though the curl vanishes at every point of the domain.

Mistakes and assumptions

  • Dropping the sign on the middle component. The y-component is ∂F₁/∂z − ∂F₃/∂x, which is the cofactor expansion's minus sign already applied. Writing ∂F₃/∂x − ∂F₁/∂z flips it.
  • Concluding "conservative" from a single point. The curl must vanish on the whole region, and the region must be simply connected.
  • Taking the curl of a scalar. Curl acts on vector fields and produces a vector field; the gradient acts on scalars. Curl of a gradient is always zero, and divergence of a curl is always zero — both are worth remembering as checks.
  • Confusing curl with divergence. Divergence measures net outflow and is a scalar; curl measures rotation and is a vector. A radial field has large divergence and zero curl; a rotational field has zero divergence and large curl.
  • Using this at a singularity. Finite differences straddle the point, so a field with 1/r behaviour cannot be differenced at the origin. The calculator returns no value rather than a wrong one.
  • Expecting exact zeros. A numerically computed curl of a conservative field lands near 10⁻¹¹, not at 0. Compare it against the size of the partial derivatives, not against zero.

Stokes' theorem in one line

The circulation of F around a closed curve equals the flux of curl F through any surface the curve bounds: ∮F·dr = ∬(∇ × F)·n dS. That is why a curl-free field has zero circulation on every contractible loop, and it is the reason curl is the right local measure of rotation. Green's theorem is the planar case of it. The line integral on the left is taken with respect to arc length along the curve, which the arc length calculator computes.

Curl among the other vector operators

Three first-order operators exhaust the differential vector calculus of ordinary space. The gradient turns a scalar field into a vector field pointing uphill. The divergence turns a vector field into a scalar measuring net outflow. The curl turns a vector field into another vector field measuring rotation. Two identities tie them together and are worth memorising: curl(grad φ) = 0 and div(curl F) = 0. Both follow from the equality of mixed partial derivatives, and both are visible in the calculator — enter the gradient of any scalar as your field and watch the curl come out at the level of rounding noise.

In physics, curl is where the field equations live. Two of Maxwell's four equations are curl equations: ∇ × E = −∂B/∂t and ∇ × B = μ₀J + μ₀ε₀∂E/∂t. In fluid mechanics the curl of the velocity field is the vorticity, and a flow with zero vorticity is called irrotational — the same word, the same condition. In mechanics a force field with zero curl is conservative, so a potential energy exists and total energy is conserved along any trajectory.

Every partial derivative on this page is computed the way the numerical derivative calculator describes, one coordinate at a time, so its discussion of step size and cancellation applies here directly. If you need the rate of change of a scalar in a specified direction rather than the rotation of a vector field, that is the directional derivative calculator.

One limitation to state plainly: this page works in Cartesian coordinates. The curl has different-looking expressions in cylindrical and spherical coordinates, with metric factors of r and sin θ, because the basis vectors themselves vary from point to point. Convert your field to Cartesian components before entering it, or use the coordinate-aware form on the divergence calculator as a model for how those factors enter.

Frequently asked questions

What does the curl of a vector field actually mean?

It is a vector describing local rotation. Its direction is the axis a tiny paddle wheel placed at that point would spin about, by the right-hand rule, and its magnitude is twice the angular velocity of that spin. A curl of (0, 0, 2) means anticlockwise rotation in the xy-plane at one radian per unit time.

How do I test whether a vector field is conservative?

Compute the curl. If it vanishes everywhere on a simply connected region, the field is conservative there and a scalar potential exists. Both conditions are needed: the classic counterexample (−y, x, 0)/(x²+y²) has zero curl everywhere it is defined, but its domain excludes the z-axis, and its circulation around a loop enclosing that axis is .

Why is my curl reported as 1e-11 instead of exactly zero?

Because the partial derivatives are computed by finite differences, not symbolically. Subtracting two nearly equal function values and dividing by a small step leaves a residue at the level of machine precision divided by the step. A value near 10⁻¹¹ against partial derivatives of order 1 is numerically zero, and the irrotational test uses a tolerance scaled to the size of the derivatives for exactly this reason.

Can a two-dimensional field have a curl?

Yes — a single component of one. For a planar field F = (F₁(x,y), F₂(x,y), 0), four of the six partial derivatives vanish and the curl reduces to (0, 0, ∂F₂/∂x − ∂F₁/∂y). That surviving scalar is what two-dimensional texts call the curl, and it is the integrand in Green's theorem. Enter F₃ = 0 and leave z out of the other components.

What is the difference between curl and divergence?

Divergence is a scalar measuring how much the field spreads out from a point; curl is a vector measuring how much it circulates around one. The radial field (x, y, z) has divergence 3 and zero curl. The rotational field (−y, x, 0) has zero divergence and curl (0, 0, 2). A general field has both, and the Helmholtz decomposition says a well-behaved field is determined by them together.

How is the scalar potential computed here?

By integrating F·dr along the straight segment from the origin to your point, parametrised as r(t) = tP, which makes the integrand F(tP)·P for t from 0 to 1. Because the field is conservative the path does not matter, so the straight ray is as good as any. The result is normalised to φ = 0 at the origin; adding any constant gives an equally valid potential.

Why does the calculator refuse to give a potential sometimes?

Either the curl is non-zero, in which case no potential exists, or the field is undefined somewhere on the straight segment from the origin to your point. The second case is common for fields with a 1/r factor, whose ray from the origin passes through the singularity. Compute the potential difference between two points that a clean path can join instead.

Does zero curl mean the field lines are straight?

No, and neither does the converse. The field (x, y, 0) has straight radial lines and zero curl; the shear (y, 0, 0) has straight parallel lines and curl (0, 0, −1). Curl measures whether a small element of the field rotates as it moves, which depends on how the field varies across the flow, not on whether individual arrows are aligned.

Can I enter a field in cylindrical or spherical components?

Not directly — this page assumes Cartesian components and Cartesian variables. In curvilinear coordinates the curl picks up metric factors, because the basis vectors change from point to point; the cylindrical form, for instance, has a 1/r in front of two of the terms. Convert your field to Cartesian components first, or work the curvilinear formula by hand.

References