Here is the calculation for reference:
Energy Cost per Inserter Rotation:
(Max Power Consumption - Drain) / (Rotation Speed / Full Rotation Constant) = kJ per Inserter Rotation
(15.1kW - 400W) / (302 / 360)/s = ~17.523 kJ
(21.4kW - 400W) / (432 / 360)/s = 17.5 kJ
(59.3kW - 500W) / (864 / 360)/s = 24.5 kJ
(169kW - 1kW) / (864 / 360)/s = 70kJ
These are Yellow, Red, Blue, and Green Inserters respectively, in order of increasing cost.
Notice how Yellow Inserters and Red Inserters are almost identical in price at ~17.5kJ, but Red Inserters are 17.5kJ exactly, while Yellow Inserters are an extra 23J. And that number is actually rounded to the nearest whole number, as there are quite a few more decimal places.
For accurate comparison with Green Inserters, we need to account for stack size, using the following math:
Energy Cost per Item Transfer:
kJ per Inserter Rotation / Stack Size
Default
(15.1kW - 400W) / (302 / 360)/s / 1 = ~17.523 kJ
(21.4kW - 400W) / (432 / 360)/s / 1 = 17.5 kJ
(59.3kW - 500W) / (864 / 360)/s / 1 = 24.5 kJ
(169kW - 1kW) / (864 / 360)/s / 2 = 35.5 kJ
Capacity Bonus 2
(15.1kW - 400W) / (302 / 360)/s / 2 = ~8.762 kJ
(21.4kW - 400W) / (432 / 360)/s / 2 = 8.75 kJ
(59.3kW - 500W) / (864 / 360)/s / 2 = 12.25 kJ
(169kW - 1kW) / (864 / 360)/s / 4 = 17.75 kJ
Capacity Bonus 7
(15.1kW - 400W) / (302 / 360)/s / 3 = ~5.841 kJ
(21.4kW - 400W) / (432 / 360)/s / 3 = ~5.833 kJ
(59.3kW - 500W) / (864 / 360)/s / 3 = ~8.167 kJ
(169kW - 1kW) / (864 / 360)/s / 12 = ~5.833 kJ
These are the energy costs at the 3 milestones of capacity research. Note that at the endgame a Green Inserter that is fully utilized will be just as energy efficient per item as a Red Inserter. This means the only difference between them is the effective drain. Given that a Green Inserter spins twice as fast as a red one, and has a stack size of 4 times as much, that means its effective throughput is 8 times as much, while only 2.5 times as much Drain. This makes them 3.2 times as efficient as Red Inserters, but only when used at max throughput. This kind of comparison cannot be achieved in other conditions as the per item costs differ and therefore do not cancel out. This means we need to convert our drain from watts into per item units of joules, which requires a predetermined throughput. As such this cannot be generalized, and must be done on a case by case basis with reference to a pre determined design.
More Data on Green Inserters:
(169kW - 1kW) / (864 / 360)/s / 2 = 35.5 kJ
(169kW - 1kW) / (864 / 360)/s / 3 = ~23.3 kJ
(169kW - 1kW) / (864 / 360)/s / 4 = 17.75 kJ
(169kW - 1kW) / (864 / 360)/s / 5 = 14 kJ
(169kW - 1kW) / (864 / 360)/s / 6 = ~11.667 kJ
(169kW - 1kW) / (864 / 360)/s / 7 = 10 kJ
(169kW - 1kW) / (864 / 360)/s / 8 = 8.75 kJ
(169kW - 1kW) / (864 / 360)/s / 9 = ~7.778 kJ
(169kW - 1kW) / (864 / 360)/s / 10 = 7 kJ
(169kW - 1kW) / (864 / 360)/s / 11 = ~6.364 kJ
(169kW - 1kW) / (864 / 360)/s / 12 = ~5.833 kJ
Looking at the additional data, we can see Green Inserters and Red Inserters also align at a stack size of 8. This means that between unlocking Capacity Bonus 5 and Capacity Bonus 7, Green Inserters actually become superior to Red Inserters.
Lets now discuss the practical takeaways of this data. Firstly we can establish that Red Inserters are in all contexts superior to Yellow Inserters. They spin faster, transfer more item/s, and do so using slightly less energy. This means replacing Yellow Inserters with Red Inserters where feasible is always advantageous by all metrics except for construction cost or upfront expense. Keep in mind though that this saving is recurring with every spin of the Inserter, so given enough time it will recuperate those additional expenses and become profitable. The exact amount of time can be calculated like so:
Cost of change in J / ((15.1kW - 400W) / (302 / 360)/s) - ((21.4kW - 400W) / (432 / 360)/s) = Number of Spins to break even
To translate spins into time, we can use a utilization formula. To avoid redundant calculations, we will be utilizing the throughput data on the wiki https://wiki.factorio.com/inserters. Take the following equation and apply it to your use case:
(Items transferred per second / Max throughput of Inserter) * (Rotation Speed / Full Rotation Constant) = Spins per second averaged
then obviously
Number of spins to break even / Spins per second = Time
Notice I have left the cost of implementing this change as an open variable, as that will also need to be calculated for your design case, and it is also determined by your supply chain. The way to make this calculation is first determine the difference in build cost in terms of raw resources like Plates. A single belt for example costs 3 plates. We will assume fabrication is free for the sake of simplicity, as though it were hand crafted. So the formula for the price of a plate would be:
Cost of mining + Cost of Smelting + Cost of transferring Plate in and out of Furnace via Inserter = Energy Cost of Plate
Steel would be a similar equation:
Energy Cost of Plate + Cost of Smelting + Cost of transferring in and out of Furnace = Energy Cost of Steel
So using the resource cost of the difference in designs we can arrive at an energy cost, and then calculate the time it will take for us to recover that much energy in savings. I would like to share a reference table of some reference costs, but that goes beyond the scope of this topic so I will save that for a separate post.
Since you are already calculating your design costs, now would be a good time to revisit what I said earlier about reintroducing drain into our calculations. Since you have a fixed design, you have a fixed throughput of goods through your inserters, and can use our utilization equation from earlier to confirm which inserter would be optimal for your use case.
Regardless to say, given enough time Red Inserters will always profit over their yellow counterpart, and that should be the primary takeaway from this topic.
Another thing worth mentioning is that Blue Inserters should be generally avoided, as they are generally inefficient by every metric when compared to Yellow and Red Inserters. Even when compared to Green Inserters, we can see that after you unlock a Stack Size of 6, Green Inserters overtake them in efficiency, assuming the full stack size is utilized. 2 Red Inserters can match the throughput of 1 Blue Inserter, with a drain penalty of 300W. Given that we are consistently saving several kJ with each rotation though, and with both inserters rotating well over once per second, the 300W penalty is insignificant when compared to the energy savings. This means Blue Inserters should only be used in specific scenarios where less than 14.4 items/s of throughput is required, and equivalent throughput cannot be achieved through a combination of lesser Inserters. Once throughput requirements through a set of Blue Inserters exceed 14.4 items/s in total, they should be replaced with a Green Inserter. What this effectively means is that after Capacity Bonus 7 you should never use 3 or more Blue Inserters on a single machine ever, and should always upgrade to a Green Inserter at that point.
Lastly, just for fun, I've included some information for the Burner Inserter:
Burner Inserter Data:
144kW / (281 / 360)/s = ~184.484 kJ
As most people have probably figured out already, Burner Inserters should only ever be used in extremely low throughput situations. The following equation describes the comparison between Burner Inserters and Electric Inserters:
(Cost of Spin A - Cost of Spin B) / Drain = Spin Threshold
In practice:
~184.5kJ - ~17.5kJ = 167 kJ
167kJ / 400W = 417.5 seconds or ~7 minutes
So for any use case where the Inserter is making more than one spin every 7 minutes on average, these Inserters should be avoided like the plague. This leaves them only practical for kickstarting steam engines via circuit control in the event of an outage, or for odd tasks like shoving ammo into turrets occasionally. The most interesting potential use case for these would for manufacturing low demand items in your mall for your personal use. Keep in mind these inserters also benefit from stack bonus like the rest, so you would divide the above number by your stack size for a proper energy calculation.
Also interesting to note at the time of writing this I learned two new facts. Firstly, Burner Inserters were apparently changed in 2.0. If it wasn't for me remembering the number as being closer to 3 minutes rather than 7, I would not have noticed, which just goes to show how often I use them. Here is the old cost calculation for comparison:
94.2kW / (281 / 360)/s = ~103.183 kJ
(~103.2kJ - 17.5kJ) / 400W = ~214.2 seconds or ~3.5 minutes
So apparently they are twice as bad now
![Laughing :lol:](./images/smilies/icon_lol.gif)
As for the second fact I mentioned, after looking at the wiki page here https://wiki.factorio.com/Burner_inserter it seems to be very badly maintained. For one thing they claim the cost per spin as 70 kJ, when we have just calculated that that is in fact less than half the actual number, and still significantly less than even the old number. Also the reason I visited the page is the first place was to clarify whether the Burner Inserter Fueling itself counted towards its energy consumption, so we could factor that into our calculation if true. My guess is it doesn't because it does not require spinning to do so, and energy seems to be defined in spins, but this information is completely missing from the page so I'm unable to confirm or deny this.
Before wrapping up I just wanted to add some of the values from earlier using the burner equation I just introduced. When using 2 Red Inserters to replace 1 Blue Inserter for example, this is an equivalent equation to the one above, which we apply like so:
Difference in energy cost per item transfer / Difference in Drain = Item Threshold
As you can the the energy cost from spins has been replaced with energy cost per item, and as the total spin speed of the two options is identical they cancel out, leaving us with the equation above. Putting it into practice:
(17.5kJ - 24.5kJ) / 300W = ~23.3 seconds
So as long as we are moving at least 1 item every 70 seconds using 2 Red Inserters will always beat 1 Blue Inserter. We can invert this fraction for items/s, which would be ~0.043. Obviously since we needed a second Red Inserter, we know that at a minimum we are moving at least 1.2 items per second, so there is no mathematical scenario where it is not profitable. This equation can be used to continue checking other variations. Also to clarify, the above calculation is made using the default spin values we originally referenced, for a stack size of 1. As you have probably caught on by now, these savings are affected by stack size. In the above equation, the stack size multiplier would be added to the denominator. This is just as with the Burner Inserter, except in this example it is actually working against us rather than in our favor. Where as the burner became more efficient each time due to how the equation was balanced, here we can see that as we divide the our values we are actually diminishing our energy savings. This is still a moot point in the above example, but perhaps possibly there is some combination of inserters you can put into this equation that makes that significant, though given there is an order of magnitude difference between the units of savings and the units of expenses I find it unlikely.
3 Yellow Inserters Replacing 1 Blue Inserter:
(~17.5kJ - 24.5kJ) / 700W = 10 seconds or 0.1 items/s
Also before I forget, here is one possible example of how you might choose to implement this in your factory for a visual reference That is all for now. Hopefully this information was interesting and thought provoking. Please feel free to add any observations you found interesting from the data. I apologize if there are any mistakes or if the logic doesn't flow well, I was quite distracted as I was chipping away at this. I am considering sharing more such calculations on various optimizations regarding energy and pollution if people are interested, perhaps in a video format. Any feedback is appreciated.
Also please, please, please, help me get this documented on the wiki. Information regarding energy based optimizations like this as well as pollution calculations is severely lacking. This information would go beautifully right here https://wiki.factorio.com/inserters#Power_usage in that worthless section with three useless sentences in it. We can put some nice tables there like we did for the throughput, and make this data easily available
TL;DR: You should replace all your inserters with the red long armed ones, its more power efficient.
Update:
For clarity I've decided to add the following equation:
(Desired Items per second * Energy Cost difference) - Drain Difference = Power Savings
What this means is that by simply plugging in the energy saving per item in kJ we calculated originally, and then multiplying that by the number of items we know we will want to load into our destination per second, we end up in terms of joules per second, which means our output number will once again be in watts. Now we can reintroduce drain by comparing the difference between how many Inserters of type A we would need vs type B, and subtracting the corresponding drain from our savings in items moved. That now gives us a total net savings in kW. This equation should be much simpler to apply in practice than the alternative I provided before