Calculating Amperage After Boost In DC-DC Circuit
You can't beat basic physics.  You can't make energy from nothing.  In steady state, the power (energy per time) out of a converter can't be more than the power you put in.

Power in this context is current times voltage.  In common units, Watts = Volts x Amps.  If you put 40 A at 3.7 V into a converter, it is getting (40 A)(3.7 V) = 148 W in.  If it were 100% efficient, that's what it would put out.  If it puts out 12 V, then the current would be (148 W)/(12 V) = 12.3 A.

Of course no such converter is 100% efficient.  The actual efficiency tells you how much of the input power (which is the same as the output power at 100% efficiency) it actually puts out.  Let's say this converter is 80% efficient.  That means it puts out (148 W)(80%) = 118.4 W, and at 12 V that would be 9.9 A.

You can also run this calculation backwards.  Let's say the converter puts out 100 W.  At 100% efficiency that would be 27 A at 3.7 V in.  At 80% efficiency, that would be (27 A)/80% = 33.8 A in at 3.7 V.  Hopefully you can see how to calculate any combination.

Physics also says you can't just disappear energy either, just like you can't make it appear from nothing.  So the remaining (148 W)-(118.4 W) = 29.6 W has to go somewhere.  In the case of a power converter like this, it goes to heat.  The 80% efficient power converter takes 80% of the input power and transfers it to the output, and heats itself up with the remaining 20% of the input power.

In this example, that 20% is nearly 30 W.  That's enough you have to think carefully about how to get rid of the heat so the electronics doesn't fry.  A few TO-220 transistors sticking up, even in forced air flow, aren't going to dissipate that much without frying.  This requires some design attention.

This also points out a major driver towards higher efficiency.  It's often not about wasting the extra power, but not having to get rid of the wasted power as heat.  Getting rid of heat is expensive.  It means a bigger package, forced air cooling, a large heat sink, or worse.  These things cost real money, usually more so than the extra electronics to be more efficient and make less heat in the first place.

Updated Example

The output needs 30 W, the converter is 90% efficient.  You should be able to see from the above that 33.3 W is required into the converter and that it will dissipate 3.3 W as heat.  If the input voltage is 3.7 V, then it will draw 9 A.  Again, you should be able to derive this for any set of values yourself from the description above.