You can use this calculator in your workshop or while designing an SMPS prototype, to find the exact physical gap required between your ferrite core pieces to hit your target inductance.

Flyback Transformer Air Gap Calculator
Calculated Gapping Results:
Total Magnetic Air Gap (lg): 0.000 mm
Required Shim / Paper Spacer Thickness: 0.000 mm
Workshop Real-World Tip: If you are inserting a uniform paper, plastic, or tape shim across the flat side legs of an un-gapped core structure (e.g., matching E-E core sets), the thickness of that shim should equal exactly half of the total calculated magnetic air gap length because the flux passes through it twice per turn loop.
Here is a quick guide on how to gather your inputs, what the results mean, and the math running under the hood.
Gathering Your Three Input Values
Now if you want that you can use this calculator properly inside your workshop or when you are making a prototype layout then you must get three specific numbers from your transformer design sheet first.
Let us look at what you need to find, we will consider the example of a 220V AC to 12V DC, 5 Amp 60 watt SMS design.
- Target Primary Inductance (Lp): This is the total inductance value that you calculated for your primary winding but you must make sure it is measured in microhenries. So for our 60-watt design example, this value is 405.
- Primary Winding Turns (Np): This is the total number of physical loops of wire that you intend to wind onto the primary side of the bobbin, so now you just count the loops. For our example design this is 32 turns.
- Core Cross-Section Area (Ae): This is the physical surface area of the middle leg of your ferrite core, but it must be measured in square millimeters. Since you need this number, so you can find this value easily if you look at the manufacturer datasheet for your core size. For example, a standard EE25 core is typically around 41 but our larger EE30/EE35 example uses 120.
When you have entered these three values into the input boxes, then you can click the "Calculate Air Gap" button.
Understanding the Calculation Results
Then when you click that button, the calculator will immediately print out two distinct values on the screen for you.
- Total Magnetic Air Gap: This is the total physical gap distance that the magnetic field needs to cross inside the complete core structure loop because if it does not cross this gap, then the ferrite material will go into saturation.
- Required Shim / Paper Spacer Thickness: This is the actual thickness of the material like cardstock, plastic shims, or transformer tape that you need that you cut and place between the core halves on your workbench.
Text Formulas Explained
Let us explain how the calculator determines these values by using fundamental magnetic circuit relationships. Since we want to understand the math running in the background so here are the exact formulas...
Formula for Total Magnetic Air Gap:
Total Magnetic Air Gap = (Permeability of Free Air * Core Cross Section Area in Meters * Primary Turns Squared) / Primary Inductance in Henrys
If the calculator wants to make this formula work in standard physics units, then it converts your inputs behind the scenes like this:
- Core Cross Section Area in Meters = Core Cross Section Area in mm2 * 0.000001
- Primary Inductance in Henrys = Primary Inductance in uH * 0.000001
- Permeability of Free Air is a fixed physics constant equal to 4 * 3.14159 * 0.0000001
Formula for the Spacer Thickness: Spacer Thickness = Total Magnetic Air Gap / 2
Real-World Bench Execution
If you want to know the reason why the required spacer thickness is exactly half of the total magnetic air gap then it comes down to the shape of your transformer core.
When you use standard E-shaped core halves, then clashing them together forms two outer legs and one center leg. If you place a flat piece of insulating tape or paper across the entire face of the core, then you are placing a spacer on the left leg, the center leg, and the right leg at the same time.
Since the magnetic field loops around the entire structure, so it has to jump through your spacer twice during each complete loop.
It jumps once on its way up through the center leg, and then it jumps once on its way back down through the outer side legs. Therefore if you insert a 0.1 mm paper shim across the un-gapped core faces, then it automatically creates a total magnetic air gap of 0.2 mm.
When you are finished inserting your calculated spacer thickness then you should always verify your work by clamping the core halves tightly together and measuring the primary winding pins with your LCR meter so that you ensure it reads close to your target microhenry value.



Need Help? Please Leave a Comment! We value your input—Kindly keep it relevant to the above topic!