Before discussing the calculation of magnetic components for switching power supplies, let's just quickly go over the basic concepts and definitions.

Transformer is a passive device which transfers alternating (AC) electric energy from one circuit into another through electromagnetic induction. Normally it consists of a ferromagnetic core and two or more coils (windings).
A changing current in the primary winding creates an alternating magnetic field in the core. The core multiplies this field and couples most of the flux through the secondary windings. This in turn induces alternating voltage (electromotive force, or emf) in each of the secondary coil according to Faraday's law. Power transformer in SMPS is designed to change amplitude of high-frequency pulses by the turns ratio and to provide isolation between circuits. Note that it can't transfer a DC component of a pulse: in a steady state mode net volt-seconds across each winding should be zero, otherwise the core will saturate.
DC output voltage can be obtained only by using rectifiers. Nevertheless, an average voltage across a real coil's terminals can be non-zero due to non-zero wire's resistance. This DC offset can be used for lossless sensing of an average current across an inductor or a transformer winding with unidirectional current: if you add an RC network parallel to the coil, the voltage across the capacitor is proportional to the coil's average current. For better thermal stability the wire can be made of low TCR material, such as a copper alloy.


normally involves trade-offs between size, cost and power losses. The main constraint in all cases (except for saturable inductors) is that peak magnetic flux density Bmax should not approach the core material's saturation flux value Bsat. In a "volt-second driven" coil, the flux change is a function of the applied volt-seconds and the core geometry. Excessive applied volt-seconds cause core saturation. When it happens, the windings are effectively shorted out. Contrary to popular misconception, Bmax does not depend on the core's magnetic properties or air gaps.

The table below provides the formulas for Bmax in a steady state operation as function of N×Ac product, applied voltage and frequency for common voltage waveforms. For a quick transformer calculation you select a core material, find from datasheet its saturation flux Bsat and pick some derating, such as 70% or so. Then you determine minimum required N×Ac product such that Bmax<0.7×Bsat, choose a core size and knowing its Ac find primary turns N. Secondary turns are calculated based on the required output voltage and duty cycle for a given SMPS topology. In general, ideal SMPS transformers need to transfer all energy instantaneously from one winding to another while storing no or little energy in the process. Some topologies do need certain amount of energy stored in magnetizing inductance for a proper operation. Conversely, a power inductor is used in SMPS as an energy storage device. It accumulates energy in the magnetic field as current flows through it, and then transfers it into another circuit during the alternate part of the switching cycle. In power supplies, the inductors are also used for filtering out high frequency currents (in which case they are often called chokes).

Function Waveform Bmax, gauss
Sine wave Sinewave voltage Vrms×108/4.44N×Ac×F
Square wave Square wave voltage Vpk×108/4N×Ac×F
Bipolar pulses with D=Ton/T=Ton×F
PWM voltage Vpk×D×108/2N×Ac×F
Unipolar pulses
with passive reset
Unidirectional voltage pulse Br+Vpk×Ton×108/N×Ac
In these and other equations: V - voltage (volts), N - coil's turns, Ac - core's cross-sectional area (sq.cm), F- frequency (hertz), Br - remanence (gauss)
Note that in higher frequencies, core loss rather than saturation normally becomes the main limiting factor.

In inductors normally the coil current is controlled. For such "current-driven" coils:
where L - inductance (in henry), Ipk - peak current in amps, B - flux in gauss. All units and formulas in this page are given in CGS (see CGS to SI unit converter). Once you set Bmax and choose a core size, you can find from the above equation the number of turns for the desired inductance L: N=L×Ipk×108/Bmax×Ac.
Note that L is not constant. If the Ipk keeps increasing, at some point Bmax will be approaching Bsat and "L" will start dropping. To prevent the core saturation at a required current, an air gap can be introduced. The length of a net discrete gap: lg≈0.4×π×N×Ipk/Bmax. Note that in practice, the gap may need to be selected slightly larger than the calculated value due to flux fringing. Combining the above equations for N and lg yields: lg≈0.4×π×L×Ipk2/(Bmax×Ac). The gap is used not only in inductors. It is also often introduced in transformers to increase working flux swing in single-ended topologies, to store more energy in magnetizing inductance, and to stabilize the inductance value.

For powder metal cores with a distributed gap and soft saturation curve, the calculation process may take several iterations. In short, you can first pick a core based on desired L×Ipk2 by using manufacturer's charts. Then determine the turns Formula for inductor turns, where AL - specific inductance in mH/1000 turns (which is nH/turn) from the data sheet. Then find peak bias H=0.4×π×N×Ipk/le (Oersted), determine the roll-off in percentage of initial permeability, and correct the turns for the desired L.

Another important constrain to be aware of is a maximum "hot spot" temperature rise. S.A.Mulder proposed in a Phillips App Note (1990) an empirical formula for thermal resistance of a wire-wound transformer measured at the hot spot: Rth≈(53...61)×Ve-0.54 oC/watt, where Ve- core volume in cubic centimeters. From this, a "rule of thumb" hot-spot temperature rise in Celsius vs. total losses P(watt) is: Trise≈50/sqrt(Ve)×P. Note that this relationship as well as most textbook procedures related to the mags thermal management are applicable to natural convection cooling. For applications with forced airflow or conduction cooling these procedures results in an over-designed part because of an overstated temperature rise.
Below you will find more magnetics theory, transformer and inductor design information, tutorials, tools and free downloads.

Transformer turns and wire calculator
(includes skin effect)

Transformer calculation for various switching regulator topologies

Software to design electrical inductors with powder cores

Current transformer design software

Ferrite magnetic calculation tool (includes skin and proximity effects)

Core loss calculator for non-sinusoidal waveforms

(MAG 100A)
Introduction and magnetics basics (design for switching power supplies)

Magnetic core characteristics

Windings data and skin effect

Power supply transformer design

Inductor and flyback transformer design

Magnetic core properties

Eddy current losses in transformer windings

The effect of leakage inductance

Coupled filter inductors

Designing magnetic components for high frequency dc-dc converters (by W.T.McLyman) - pdf download

The following three guides are instructor's slides: see their author's terms of use

Basic transformer theory

SMPS transformer design procedure and equations

Inductor design procedure

Planar power transformers basics and design guide

Electrical transformer: how it works and physical principles