Flyback Converter Calculator

Find the turns ratio, magnetizing inductance, and peak switch currents for flyback converter design in CCM and DCM switch-mode power supplies.

๐Ÿ”„ Flyback Converter Calculator
Input Voltage (Vin)24 V
V
5 V400 V
Output Voltage (Vout)5 V
V
1 V100 V
Duty Cycle0.40
D
0.050.95
Input Voltage (Vin)24 V
V
5 V400 V
Output Power (Pout)10 W
W
1 W1000 W
Duty Cycle0.40
D
0.050.95
Switching Frequency100 kHz
kHz
10 kHz1000 kHz
Converter Efficiency85 %
%
50%99%
Turns Ratio (Np : Ns)
Reflected Output Voltage
Peak Switch Voltage (Vds)
Recommended Vds Rating

๐Ÿ”„ What is a Flyback Converter?

A flyback converter is a type of isolated DC-DC switch-mode power supply (SMPS) that stores energy in a transformer's magnetic field during the switch on-time and transfers it to the output through the secondary winding during the switch off-time. Unlike a forward converter where energy flows to the output continuously, the flyback topology uses a single switching transistor and a coupled inductor (the flyback transformer) to provide galvanic isolation between input and output while stepping voltage up or down.

Flyback converters are the most widely used isolated converter topology for output powers from 1 W to approximately 150 W. They appear in phone chargers, laptop adapters, set-top box power supplies, LED driver circuits, industrial 24 V isolated rails, and any application requiring a low-cost isolated output. Multiple isolated secondary windings can provide several independent output voltages from a single converter, making flyback designs especially versatile for multi-rail power supplies.

A common misconception is that the flyback transformer works like a conventional mains transformer. It does not. The flyback transformer is functionally a coupled inductor, and energy stored in the core's air gap during the on-time is the key operating mechanism. The turns ratio determines voltage conversion and switch voltage stress, not just impedance transformation. The magnetizing inductance directly sets the peak current, stored energy, and whether the converter operates in Discontinuous Conduction Mode (DCM, where the core fully demagnetises each cycle) or Continuous Conduction Mode (CCM, where residual flux remains).

This calculator covers the two most critical design steps: finding the transformer turns ratio and estimating the minimum magnetizing inductance for DCM operation. The Turns Ratio mode handles converter topology analysis and MOSFET selection, while the Inductance and Current mode outputs the inductance value to specify to a transformer manufacturer and the currents needed for winding wire sizing and core selection.

๐Ÿ“ Formulas

N (Np:Ns)  =  Vin × D ÷ (Vout × (1 − D))
N = primary to secondary turns ratio (Np/Ns), dimensionless
Vin = DC input voltage (V)
Vout = DC output voltage (V)
D = duty cycle, fraction of switching period when switch is ON (0 to 1)
Vreflected = Vout × N = reflected output voltage at primary (V)
Vds_peak = Vin + Vreflected = theoretical peak switch voltage (V)
Inductance: Lm = Vin² × D² × η ÷ (2 × Pout × Fs)
Ip_peak = 2 × Pout ÷ (η × Vin × D) = peak primary current at DCM boundary (A)
Ip_rms = Ip_peak × √(D/3) = primary RMS current for triangular waveform (A)
η = converter efficiency (0 to 1)
Fs = switching frequency (Hz)
Example: Vin=24V, Vout=5V, D=0.4 → N = 9.6/3 = 3.200, Vds = 24+16 = 40V

๐Ÿ“– How to Use This Calculator

Steps

1
Choose the calculation mode - select Turns Ratio to find the transformer Np:Ns ratio and switch voltage rating, or Inductance and Current to find the minimum magnetizing inductance and primary currents for DCM design.
2
Enter input and output voltages - type the DC input voltage and the required DC output voltage in volts. For offline designs, use the peak rectified mains voltage: 325 V for 230 VAC or 170 V for 120 VAC input.
3
Set the duty cycle - enter the target duty cycle as a fraction between 0.05 and 0.95. Values between 0.35 and 0.50 are standard for most flyback designs and balance switch stress against primary current.
4
Add power and frequency (Inductance mode) - in Inductance and Current mode, also enter output power in watts, switching frequency in kHz, and the estimated converter efficiency. A typical efficiency of 80 to 90 percent is reasonable for initial design.
5
Read and apply the results - use the turns ratio to wind or specify the transformer, the Vds rating to select the primary MOSFET, and the inductance and peak current values to choose the core size and verify it will not saturate at the peak current.

๐Ÿ’ก Example Calculations

Example 1 - 24 V to 5 V USB Charger (Turns Ratio Mode)

Vin = 24 V DC, Vout = 5 V, Duty Cycle D = 0.40

1
Turns ratio: N = Np/Ns = 24 × 0.4 / (5 × 0.6) = 9.6 / 3.0 = 3.200 : 1
2
Reflected output voltage: Vref = 5 × 3.2 = 16.00 V
3
Peak switch voltage: Vds = 24 + 16 = 40.0 V (before leakage spike)
4
Recommended MOSFET Vds rating with 50% margin: 40 × 1.5 = 60 V. Select a 60 V or 80 V MOSFET.
Result: Np:Ns = 3.200 : 1, Vds_peak = 40 V, Recommended Vds = 60 V
Try this example →

Example 2 - 48 V Telecom Bus to 12 V (Turns Ratio Mode)

Vin = 48 V DC, Vout = 12 V, Duty Cycle D = 0.45

1
Turns ratio: N = 48 × 0.45 / (12 × 0.55) = 21.6 / 6.6 = 3.273 : 1
2
Reflected output voltage: 12 × 3.273 = 39.27 V
3
Peak switch voltage: 48 + 39.27 = 87.3 V
4
Recommended Vds rating: 87.3 × 1.5 = 131 V. Select a 150 V or 200 V MOSFET.
Result: Np:Ns = 3.273 : 1, Vds_peak = 87.3 V, Recommended = 131 V
Try this example →

Example 3 - 10 W Charger Inductance and Current (Inductance Mode)

Vin = 24 V, Pout = 10 W, D = 0.40, Fs = 100 kHz, Efficiency = 85%

1
Peak primary current: Ip_pk = 2 × 10 / (0.85 × 24 × 0.4) = 20 / 8.16 = 2.451 A
2
Minimum Lm for DCM: Lm = 24 × 0.4 / (2.451 × 100,000) = 9.6 / 245,098 = 39.17 μH
3
Average input current: Iavg = 10 / (0.85 × 24) = 0.490 A
4
Primary RMS current (triangular wave): Irms = 2.451 × √(0.4/3) = 2.451 × 0.365 = 0.895 A
Result: Lm = 39.17 μH, Ipeak = 2.451 A, Irms = 0.895 A
Try this example →

โ“ Frequently Asked Questions

What is the turns ratio formula for a flyback converter?+
For a flyback converter in CCM, N = Np/Ns = Vin times D divided by (Vout times (1 minus D)). For Vin = 24 V, Vout = 5 V, D = 0.4: N = 9.6 / 3 = 3.20. This means the primary winding has 3.20 turns for every one turn on the secondary. The turns ratio directly sets the reflected voltage and the MOSFET voltage stress.
How do I calculate the duty cycle for a flyback converter?+
Rearrange the conversion equation: D = N times Vout / (Vin plus N times Vout). For a 3.2:1 turns ratio, 24 V input, 5 V output: D = 3.2 times 5 / (24 plus 16) = 16 / 40 = 0.40. Always verify that D stays below 0.5 to ensure the core has sufficient time to fully demagnetise before the next switching cycle begins.
What is the minimum magnetizing inductance for DCM operation?+
Lm_min = Vin squared times D squared times eta divided by (2 times Pout times Fs). For Vin = 24 V, D = 0.4, eta = 0.85, Pout = 10 W, Fs = 100 kHz: Lm = 576 times 0.16 times 0.85 / (2 million) = 39.17 uH. An inductance at or below this value ensures the core demagnetises fully each cycle, keeping the converter in DCM at full load.
What is the peak primary current in a flyback converter?+
At the DCM boundary: Ip_peak = 2 times Pout divided by (eta times Vin times D). For 10 W, eta = 0.85, Vin = 24 V, D = 0.4: Ip_peak = 20 / 8.16 = 2.45 A. The transformer core must not saturate at this peak current. The MOSFET drain current rating and snubber design are based on this value plus a safety factor of at least 20 percent.
How do I calculate the peak MOSFET voltage stress in a flyback converter?+
Theoretical peak Vds = Vin plus Vreflected, where Vreflected = Vout times (Np/Ns). For Vin = 24 V, Vout = 5 V, N = 3.2: Vds = 24 + 16 = 40 V. Leakage inductance causes additional voltage spikes at turn-off. Add at least 50 percent margin for a conservative design: 40 times 1.5 = 60 V minimum MOSFET rating. A 60 V or 80 V device is standard for this operating point.
What is the difference between DCM and CCM in a flyback converter?+
In Discontinuous Conduction Mode (DCM), the transformer fully demagnetises before the next switching cycle, so primary current always starts from zero. DCM is simple to stabilise and reduces switch voltage stress but requires higher peak currents. In Continuous Conduction Mode (CCM), residual flux remains, allowing lower peak current but introducing a right-half-plane zero that complicates the control loop compensation and can cause instability.
Why is reflected output voltage important in flyback design?+
The reflected output voltage (Vout times Np/Ns) adds to Vin during switch turn-off, creating the peak Vds stress. A high reflected voltage demands a higher-voltage MOSFET, which typically has higher on-resistance and greater conduction losses. Designers balance reflected voltage against peak primary current: a higher turns ratio reduces peak current but raises switch voltage stress, and vice versa.
What switching frequency should I use for a flyback converter?+
Most consumer flyback designs operate at 65 to 130 kHz, balancing core loss, EMI compliance, and transformer size. Higher frequencies (above 200 kHz) allow smaller transformers and capacitors but increase switching losses in the MOSFET and output diode. Designs targeting maximum efficiency in USB Power Delivery chargers often use 65 to 100 kHz with a synchronous rectifier on the secondary.
How do I convert the turns ratio to actual primary and secondary turn counts?+
Choose the secondary turns first based on the minimum practical winding, often 3 to 10 turns for standard output voltages. Then multiply by the calculated ratio: Np = N times Ns. For N = 3.2 and Ns = 5 turns: Np = 16 turns. Integer winding is required, so round N times Ns to the nearest integer. The resulting small deviation in ratio shifts the steady-state duty cycle slightly and is acceptable in practice.
What core material should I use for a flyback transformer?+
MnZn ferrite grades such as Ferroxcube 3C90, 3C95, or TDK PC40 are standard for 65 to 300 kHz flyback transformers. NiZn is preferred above 500 kHz. Select a core with sufficient energy storage: the core must handle Lm times Ip_peak squared divided by 2 joules without saturating. Operating flux density should stay below 200 to 300 mT at maximum temperature, well under the saturation limit of 350 to 400 mT for MnZn ferrite.
Can a flyback converter provide multiple isolated output voltages?+
Yes. Additional secondary windings on the same core provide extra isolated rails from a single primary switch. The feedback loop controls only the main output, so auxiliary outputs vary somewhat with load (cross-regulation). For tighter regulation on auxiliary rails, use linear post-regulators (LDOs) or add separate windings to the control circuit. Multiple-output flybacks appear in set-top boxes, televisions, and industrial DIN-rail supplies.
What is the purpose of the snubber circuit in a flyback converter?+
A snubber absorbs the energy in the transformer leakage inductance at MOSFET turn-off. Without it, leakage energy creates a high-frequency voltage spike on top of the Vds peak, which can exceed the MOSFET breakdown voltage and destroy the device. A simple RCD snubber (resistor, capacitor, diode) clamps the spike at a controlled level. The snubber dissipates energy as heat, so it reduces efficiency; more advanced active clamps recycle this energy back to the input.