Skip to content
MC Calc

Comparators and containers: how many items for each signal strength

The comparator fill-level formula, item counts for every signal strength in chests, hoppers and droppers, and why sorters use 18 items plus 4 blockers.

Java Edition5 min read

Place a comparator facing away from a chest, hopper or furnace and it outputs a signal that grows as the container fills up. That one behaviour powers item sorters, full-chest alarms, storage indicators and countless clocks. The output follows an exact formula, so you can work out in advance how many items light up each level instead of adding them one by one and watching the dust.

The formula

The comparator measures fullness, not item count. Every slot contributes its item count divided by that item’s maximum stack size, so 64 cobblestone, 16 ender pearls and one sword each count as one full slot. The game adds those up, divides by the number of slots, and converts the result to a signal:

signal = ⌊ Σ(count ÷ max stack) ÷ slots × 14 ⌋ + 1 (0 if the container is empty)

Two details matter. The + 1 means any single item gives at least signal 1, and the result is rounded down, so the levels after that are evenly spaced steps of 1⁄14 of the container. Turned around, the fewest items of one kind for signal n is:

items = ⌈ slots × max stack × (n − 1) ÷ 14 ⌉ (n ≥ 2)

Items per signal strength

For items that stack to 64:

SignalHopper (5)Dropper (9)Chest (27)Double chest (54)
11111
22342124247
34683247494
469124371741
592165494988
81602888641,728
102063711,1112,222
142985351,6053,210
15320 (full)576 (full)1,728 (full)3,456 (full)

Signal 15 needs a completely full container, so a full-chest alarm should test for 15, and a “nearly full” warning for 14. Furnaces count all three slots (input, fuel and output), and brewing stands their five slots, with the same formula.

Why item sorters use 18 + 4

The classic hopper item sorter puts a hopper under the item stream with a comparator reading it. The filter hopper holds the item to sort in its first slot and one renamed “blocker” item in each of the other four. The blockers can’t be pulled out by the hopper below, and since nothing else can stack with them they keep the other slots occupied, so the only thing that can enter the hopper is more of the filter item.

Worked example

18 filter items + 4 blockers

  1. Contents: 18 + 1 + 1 + 1 + 1 = 22 stackable items. Fullness = 22 ÷ 64 ÷ 5 = 0.069; × 14 = 0.96; rounded down 0, plus 1 = signal 1.
  2. One more filter item arrives: 23 items. 23 ÷ 64 ÷ 5 × 14 = 1.006 → signal 2.
  3. Signal 2 reaches one block further along the dust than signal 1, which is enough to switch off the redstone torch that keeps the hopper below locked. That hopper pulls one item out, the count drops back to 22, and the signal returns to 1. The design works because 22 and 23 sit exactly on either side of the signal-2 threshold.

Sorting an item that stacks to 16 (eggs, ender pearls, snowballs)? Each one counts as four 64-stackable items, so the threshold moves: 6 of them with four 64-stack blockers already gives signal 2. Use 16-stack blockers or check the numbers in the calculator.

Unstackable items

A tool, weapon, potion or enchanted book fills a whole slot on its own. One sword in a hopper is a full slot out of five: 1 ÷ 5 × 14 = 2.8, rounded down to 2, plus 1 = signal 3. Two swords give 6, three give 9. In a dropper, one unstackable item already gives 2, so signal 1 can’t be produced at all with unstackables.

This is why comparator-based “counters” often use a dropper or hopper loaded with non-stackable items: each item moves the signal in a big, predictable step.

Mixed contents are fine: count each slot separately. A hopper with 32 cobblestone (half a slot) and 8 ender pearls (half a slot) is one full slot out of five, the same as one sword: signal 3.

Reading other blocks

Comparators read more than containers: a cake gives 2 per remaining slice, a jukebox gives a value for each music disc, composters give their fill level, and item frames give the rotation of their item. The fill-level formula above applies to chests, trapped chests, barrels, shulker boxes, hoppers, droppers, dispensers, furnaces and brewing stands — and to minecarts with chests or hoppers detected through a detector rail. Crafters are the exception: they output the number of slots that are filled or disabled (0–9), whatever the stack sizes.

Planning storage indicators

For a storage room, decide what you want to know first. A single “full” lamp needs signal 15. A ten-step gauge on a double chest needs about 247 items per step (signal 2, 3 and so on), and a line of dust one block longer for each level: signal strength fades by one per dust, so a lamp on the n-th dust lights at signal n. Pair it with the Storage & Hopper Calculator to know how many items a room of chests holds before you build the display.

Redstone Signal & Timing CalculatorSignal for any container and item count, and the item count for every signal level.
All guides →