Now we made this simple online calculator tool so that we can easily calculate all the important working parameters of this universal buck-boost converter circuit just by putting some basic values like input voltage, output voltage, output current, switching frequency, and inductor size.
This tool is directly based on how a real universal buck-boost converter works using one switching device like MOSFET, one fast diode, one inductor, and one output capacitor, as we have already shown in the diagram.
This calculator is very useful then when we are designing or testing any practical buck or boost or buck-boost converter circuit using any kind of PWM source like Arduino, IC 555, SG3525, or TL494.
It shows us the ideal duty cycle, the ripple current in the inductor, the RMS current load on the inductor, the peak current stress on the MOSFET, the ripple voltage across the output capacitor, the power output, and even the approximate efficiency.
So now we do not need to do any manual formula solving, we just put the values and get all the design parameters instantly in one click.
Buck-Boost Converter Calculator

Simulation Results (Tweak it as you want)
Buck Boost Converter Explanation with Code and Diagram
We see that in the above diagram, there is one MOSFET which is working like a high-speed switch, and that is controlled through some PWM source, that may be an Arduino or any other oscillator like 555 timer, SG3525, TL494, etc.
Then there is one 100 ohm resistor which is going from the gate of that MOSFET to the PWM pin, and one 10k resistor is pulling that gate to ground, so that it does not float and misfire.
The MOSFET is taking the input supply at its drain terminal, and then its source is connected with one inductor, and that inductor is going to a Schottky diode, and then a big 2200uF capacitor and a battery load.
How the Circuit Works During ON and OFF Cycles
Now we try to understand what really happens when this MOSFET is turned ON and OFF very fast by that oscillator signal.
So when the gate gets positive pulses, the MOSFET turns ON, and that time the current starts building in the inductor.
That current is not going to the output directly because the diode is reverse biased at that moment. So that current gets stored in the magnetic field of the inductor like an energy pump.
Then when the PWM goes LOW, and the MOSFET turns OFF, that time the inductor gets sudden break in current flow, and due to its stored energy and collapsing magnetic field, the inductor creates a reverse kickback voltage which adds up with the input voltage.
This boosted voltage forward-biases the diode and charges the capacitor and the battery. So like this, energy is transferred in boosted form during the OFF time of the switch.
Why We Call It Buck Boost
But same time, if the duty cycle is more, then the energy transferred becomes less per cycle, so the output voltage drops.
And if duty cycle is less, then more energy is pumped during OFF time and the output voltage goes higher.
So by adjusting the duty cycle of the PWM, we can control whether the circuit will work like a buck converter (reduce voltage) or a boost converter (increase voltage), or both — that's why we call it a buck-boost converter.
What the Calculator is Doing
Now this calculator is doing many important calculations based on this concept. So first we enter input voltage (Vin), output voltage (Vout), output current (Iout), frequency (Hz), and inductor value in microhenries (µH).
What All Things It Calculates
Then it calculates:
1. Duty Cycle (D):
That we find by formula D = Vout / (Vout + Vin). That tells us how much ON time is needed ideally to get the required output.
2. Inductor Ripple Current (ΔI):
That shows how much current is building and dropping in the inductor during ON/OFF. Formula we used is (Vin * D) / (L * Freq). Bigger inductance or higher frequency makes ripple less.
3. Inductor RMS Current:
This we calculate because inductor actually handles both DC and ripple. RMS gives heating equivalent. We used formula sqrt(Iin² + ΔI²/12).
4. MOSFET Peak Current:
That is important to check because that is the highest current the MOSFET will see. That we find as Iin + (ΔI/2).
5. Ripple Voltage:
That is calculated by assuming a capacitor value (in our case 2200uF) and using formula ΔI / (8 * Freq * C).
6. Power Output (W):
Simple multiplication of Vout * Iout.
7. Efficiency (ideal):
We also calculate this as Pout / Pin * 100, which gives us a rough idea how much energy is lost. But this is only theoretical because we did not count diode drop, MOSFET heat loss, etc.
How It Matches Your Circuit Diagram
This calculator becomes very handy then when we want to design a real circuit like this one. We can change values and test which combination gives best ripple, best current, best power delivery without damaging the components.
This whole working is directly matching with your uploaded diagram, where the parts are:
- PWM controller → Any oscillator source
- MOSFET → Main switch
- Inductor (100uH) → Energy storage and boost
- Diode → Freewheeling path during OFF time
- Capacitor (2200uF) → Output filter
- Battery (24V) → Load and energy receiver
Comments
is it possible to make this without a inductor
No, not possible…