Flyback Transformer Calculator

Primary-to-secondary turns ratio from duty cycle, or duty cycle from a chosen turns ratio, plus switch voltage stress.
Turns Ratio from Duty Cycle
Duty Cycle from Turns Ratio

Turns Ratio (N = Ns/Np)

N = (Vout+Vf)×(1−D) / (Vin×D)
24V→5V, D=0.45
85V→12V, D=0.4
325V→19V (mains), D=0.35
V
V
V
Enter values and press Calculate.

Duty Cycle (for a Chosen Turns Ratio)

D = (Vout+Vf) / (N×Vin + Vout+Vf)
24V→5V, N=0.229 (1:4.37)
85V→12V, N=0.147
325V→19V, N=0.06
V
V
V
Enter values and press Calculate.

Flyback Transformer Design Basics

The flyback converter is an isolated buck-boost derivative: energy is stored in the transformer's primary winding while the switch is on, then released to the secondary (and load) while the switch is off. Because the transformer provides galvanic isolation and turns-ratio scaling in one step, it is the workhorse topology for isolated AC-DC adapters, phone chargers, and auxiliary power supplies from a few watts up to a few hundred watts.

QuantityFormula
Turns ratio (N=Ns/Np)N = (Vout+Vf)×(1−D) / (Vin×D)
Duty cycle for a chosen ND = (Vout+Vf) / (N×Vin+Vout+Vf)
Reflected output voltage (primary side)Vor = N×(Vout+Vf) = N×Vout+N×Vf
Ideal primary switch stress (no leakage spike)Vsw = Vin+Vor

These are ideal-CCM formulas ignoring transformer leakage inductance; in a real design the primary switch also sees a voltage spike from leakage inductance energy at turn-off, which is why flyback designs always include a clamp (RCD or active clamp) and a switch voltage rating with healthy margin above the ideal Vsw.

Real-World Applications & Examples

Worked examples

1. 24V→5V, D=0.45. With Vf=0.5V: N=(5+0.5)×(1−0.45)/(24×0.45)=5.5×0.55/10.8=0.280 (about 1:3.57, Np:Ns).
2. 85V→12V, D=0.4 (low-line off-line supply). N=(12+0.5)×0.6/(85×0.4)=7.5/34=0.221 (about 1:4.53).
3. 325V (rectified 230VAC mains)→19V, D=0.35. N=(19+0.5)×0.65/(325×0.35)=12.675/113.75=0.111 (about 1:9, typical for a mains-input laptop-charger-style flyback).
4. Duty cycle for N=0.229, 24V→5V. D=(5+0.5)/(0.229×24+5.5)=5.5/(5.5+5.5)=50% — a turns ratio chosen to center the duty cycle at 0.5 for balanced flux/timing margin.
5. Reflected voltage & switch stress. Using example 1's N=0.280: Vor=0.280×5.5=1.54V... (note: for higher-voltage examples this becomes significant) — for example 3 (N=0.111, Vout+Vf=19.5V): Vor=0.111×19.5≈2.16V, so ideal Vsw=325+2.16≈327 V before any leakage spike margin.
6. Design trade-off. Choosing a larger N (more secondary turns per primary turn) lowers the required duty cycle but raises the reflected voltage Vor and thus primary switch stress — flyback design is fundamentally a balance between duty cycle range and switch voltage rating.

Frequently Asked Questions

What is the flyback transformer turns ratio formula?

N=Ns/Np=(Vout+Vf)×(1−D)/(Vin×D), derived from the ideal volt-second balance across one switching cycle, including the output rectifier diode's forward voltage drop.

Why does the diode forward drop Vf matter?

It adds directly to the required reflected output voltage; for low-voltage outputs (like 3.3V or 5V), Vf (typically 0.3–0.7V) is a significant fraction of Vout and meaningfully affects the calculated turns ratio.

What is a typical duty cycle target for flyback design?

Many designs target D around 0.4–0.5 at nominal input voltage, leaving margin for the duty cycle to increase as input voltage drops (e.g. during mains sag) without hitting the controller's maximum duty cycle limit.

What is reflected output voltage (Vor)?

The output voltage (plus diode drop) as seen from the primary side through the turns ratio, Vor=N×(Vout+Vf); it adds to Vin to set the ideal primary switch off-state voltage.

Why does the primary switch need extra voltage margin beyond Vin+Vor?

Transformer leakage inductance is not part of the ideal magnetizing inductance and causes a voltage spike at switch turn-off; a clamp circuit (RCD snubber or active clamp) limits this spike, but the switch must still be rated well above Vin+Vor to survive it safely.

How do I choose the turns ratio for a mains-input flyback?

Start from the rectified DC input voltage range (including worst-case low-line and high-line), the desired duty cycle range, and the available switch voltage rating, then iterate the turns ratio to balance duty cycle margin against reflected voltage/switch stress.

Is the flyback formula the same as the buck-boost duty cycle formula?

Structurally similar (both derive from the same volt-second balance principle), but the flyback formula adds the turns ratio N and the diode drop Vf, since the flyback is effectively a buck-boost with an isolation transformer instead of a single inductor.

What happens if duty cycle exceeds 50%?

Above 50% duty cycle in a flyback, subharmonic (period-doubling) oscillation can occur in peak-current-mode control unless slope compensation is added; many designs deliberately keep D below 50% at nominal conditions to avoid this.

Can a flyback transformer have multiple secondary windings?

Yes — a common design technique for multi-output isolated supplies, where each secondary winding's turns count sets its output voltage proportionally to the others, sharing the same primary energy storage cycle.

Why is flyback preferred for low-power isolated supplies?

It needs only one magnetic component (combining inductor and transformer functions) and relatively few parts, making it the simplest and most cost-effective isolated topology for power levels up to roughly 100–150W.

How does input voltage range affect the required duty cycle range?

As Vin varies (e.g. across a universal 85–265VAC mains range), D must adjust to maintain constant Vout; the turns ratio should be chosen so the resulting duty cycle range stays within the controller's safe operating limits across the full input range.

What is the difference between flyback and forward converter isolation?

Flyback stores energy in the transformer itself (acting as a coupled inductor) and transfers it during switch off-time; a forward converter transfers energy directly while the switch is on and uses a separate output inductor, generally suited to higher power levels than flyback.

Related Calculators

DC-DC Duty Cycle CalculatorTransformer CalculatorConverter Efficiency CalculatorAll Calculators