Flux measures how much of something passes through a surface. Whether you’re working with magnetic fields, electric fields, or flowing fluid, the core calculation is the same: multiply the strength of the field by the area it passes through, then adjust for the angle. The general formula is Φ = F · A · cos(θ), where F is the field strength, A is the area of the surface, and θ is the angle between the field and a line perpendicular to the surface.
The Core Idea Behind Flux
Think of flux as “how much stuff flows through a window.” If you hold a window screen directly facing the wind, the maximum amount of air passes through. Tilt the screen at an angle, and less air gets through. Turn it parallel to the wind, and nothing passes through at all. That tilt is what the cosine term captures in every flux formula.
In mathematical terms, flux through a surface is the dot product of the field vector and the surface’s area vector (a vector that points perpendicular to the surface, with a magnitude equal to the surface’s area). For a uniform field passing through a flat surface, this simplifies to:
Φ = F · A · cos(θ)
When θ = 0° (field hits the surface head-on), cos(0°) = 1, and you get maximum flux. At θ = 90° (field runs parallel to the surface), cos(90°) = 0, and flux is zero. This relationship holds across every type of flux calculation.
Magnetic Flux
Magnetic flux tells you how much magnetic field passes through a given area. For a uniform magnetic field passing through a flat surface, the formula is:
Φ = B · A · cos(θ)
Here, B is the magnetic field strength (in teslas), A is the area of the surface (in square meters), and θ is the angle between the magnetic field direction and the normal (perpendicular) to the surface. The result is measured in webers (Wb), where 1 Wb = 1 T · m².
For example, suppose a magnetic field of 0.5 T passes through a rectangular loop that measures 0.2 m by 0.3 m, and the field hits the loop at a 30° angle to the perpendicular. The area is 0.06 m². The flux is 0.5 × 0.06 × cos(30°) = 0.5 × 0.06 × 0.866 = 0.026 Wb. If you tilted that same loop so the field was perpendicular to its face (θ = 0°), flux would increase to 0.03 Wb. Magnetic flux is central to Faraday’s law of electromagnetic induction, which says that a changing magnetic flux through a loop produces a voltage.
Electric Flux and Gauss’s Law
Electric flux works the same way, but with an electric field instead of a magnetic one. For a uniform electric field through a flat surface:
Φ = E · A · cos(θ)
E is the electric field strength (in newtons per coulomb or volts per meter), A is the area, and θ is the angle between the field and the surface normal. The SI unit of electric flux is N·m²/C (or equivalently, V·m).
Electric flux becomes especially powerful when paired with Gauss’s Law, which says that the total electric flux out of any closed surface equals the charge enclosed divided by the permittivity of free space (a constant, approximately 8.85 × 10⁻¹² C²/N·m²). In equation form: Φ = Q / ε₀. This means if you know the charge inside a closed surface, you can immediately find the total flux without worrying about the field’s direction at every point. Conversely, if you can calculate the flux through a symmetric surface, you can determine the enclosed charge or the electric field strength.
Fluid Flow and Volumetric Flux
In fluid mechanics, flux describes the volume of fluid passing through a cross-section per unit time. The formula is:
Q = A · v
Q is the flow rate (in cubic meters per second), A is the cross-sectional area of the pipe or opening, and v is the average fluid velocity. This is the simplest flux calculation because, in many practical situations, the fluid flows straight through a pipe and the velocity is perpendicular to the cross-section, so the angle factor is already 1.
If the flow isn’t perpendicular to the surface you’re measuring through, you add the cosine term: Q = A · v · cos(θ). For a pipe with a 0.1 m² cross-section carrying water at 2 m/s, the volumetric flux is simply 0.2 m³/s. In mass transport, you can also calculate mass flux by multiplying the fluid density by velocity, giving you the mass passing through a surface per unit time per unit area.
Calculating Flux for Non-Uniform Fields
All the formulas above assume the field is the same strength everywhere across the surface. When the field varies from point to point, or the surface is curved, you need integration. The general flux integral is:
Φ = ∬ F · n dS
This says: at every tiny patch of surface (dS), take the dot product of the field vector (F) with the unit normal vector (n) pointing outward from the surface, then add up all those contributions. In practice, you break the curved surface into a coordinate system you can integrate over.
For a surface described as a height function z = h(x, y) above the xy-plane, the surface integral converts into a double integral over x and y. You evaluate the field components at each point on the surface and account for how the surface tilts by including partial derivatives of h. This sounds complex, but the process follows a consistent pattern: parameterize the surface, find the normal vector, dot it with the field, and integrate.
For many textbook problems, symmetry simplifies things enormously. If the field has a constant magnitude on a spherical surface and points radially outward everywhere, the dot product with the normal just gives you the field strength, and the integral reduces to the field strength times the total surface area.
Steps for Any Flux Calculation
Regardless of the type of flux, the process follows the same logic:
- Identify the field and surface. What is flowing or passing through (magnetic field, electric field, fluid velocity)? What surface are you measuring through?
- Determine the surface normal. Draw or calculate a vector perpendicular to your surface. For a flat surface, this is straightforward. For curved surfaces, the normal changes at every point.
- Find the angle. Measure or calculate θ between the field direction and the surface normal at each point.
- Apply the formula. For uniform fields and flat surfaces, use Φ = F · A · cos(θ). For non-uniform fields or curved surfaces, set up the surface integral Φ = ∬ F · n dS.
- Check your sign. Flux can be positive or negative. Positive flux means the field passes through in the direction of the normal vector. Negative means it passes through in the opposite direction. For closed surfaces, outward flow is typically defined as positive.
Diffusion and Heat Flux
In transport phenomena, flux describes how a substance or energy spreads from regions of high concentration to low concentration. Fick’s Law gives mass flux as:
q = -D · A · (∂C/∂x)
D is the diffusion coefficient (how easily the substance spreads through the medium), A is the cross-sectional area, and ∂C/∂x is the concentration gradient, or how quickly the concentration changes with distance. The negative sign indicates that diffusion moves material from high to low concentration, opposing the direction of increasing concentration.
Heat flux follows the same structure. Fourier’s Law replaces concentration with temperature and the diffusion coefficient with thermal conductivity. The pattern is identical: flux equals a material property times the rate of change of whatever is being transported. In both cases, a steeper gradient (a bigger difference over a shorter distance) produces a larger flux.

