If the repeater is the block beginners learn first, the comparator is the block they avoid longest. It has two modes, a front-facing torch that changes its whole behavior, and a near-magical ability to read the inside of a chest without opening it. That combination makes it look complicated.

It is not complicated, it is just doing several different jobs with one small block. Once you understand signal strength as a number from 0 to 15 and learn what the comparator does with that number, the comparator becomes the single most useful block in your redstone toolkit.

This guide is pinned to Minecraft 1.21.4 Java Edition. Comparator behavior and the signal strength model here are stable and unchanged across recent versions, so everything below applies directly.

Signal strength: the 0 to 15 scale

Every redstone signal carries a strength from 0 (off) to 15 (maximum). This is the foundation, and most redstone confusion vanishes once it is internalized.

  • A redstone torch, lever, or button outputs strength 15.
  • Redstone dust loses 1 strength per block it travels. A signal of 15 reaches 15 blocks before fading to 0.
  • A repeater resets a signal back to 15 and can delay it, which is how long redstone lines stay powered.
  • A comparator does NOT amplify. It passes a signal through at the strength it receives, or outputs a strength it calculates. This is the key difference from a repeater.

Hold that distinction: a repeater is a booster and delayer, a comparator is a measurer and a comparer. They look similar with their little torches, but they do opposite things to strength.

You can read signal strength directly in survival by placing redstone dust in a line and counting how many blocks stay lit. A signal of strength 7 lights 7 blocks of dust and dies. This is the cheapest debugging tool in redstone, and it is how you verify a comparator is outputting the value you expect.

The comparator's two modes

A comparator has a small torch on its front face. Right-clicking the comparator toggles that front torch, switching between its two modes.

  • Compare mode (front torch unlit, off): The comparator passes its rear input through to the output, UNLESS a side input is stronger, in which case it outputs 0. In words: "output my back signal, but only if no side signal beats it."
  • Subtract mode (front torch lit, on): The comparator outputs its rear input minus the larger side input. If the back is 12 and the side is 5, the output is 7. If the side is equal or greater, the output is 0.

The comparator has three sides that matter: the back (rear, the main input) and the two sides (left and right, the secondary inputs). Output comes from the front.

Compare mode asks "is my main signal still the strongest?" Subtract mode asks "what is left of my main signal after I take the side away?" Same block, one torch, two completely different questions.

A quick memory aid: the front torch is lit in subtract mode. Lit means it is "burning away" part of your signal. Unlit means it is just comparing. If a circuit behaves backward from what you expect, the very first thing to check is whether that torch is on or off.

Reading containers: the comparator's superpower

The single most powerful comparator feature is measuring container fullness. Place a comparator so its back points out of a container, a chest, barrel, hopper, dispenser, dropper, furnace, brewing stand, even a jukebox or a cake, and it outputs a signal strength proportional to how full that container is.

The output runs from 0 to 15:

  • Empty container: output 0.
  • Anything at all inside: output at least 1.
  • Completely full container: output 15.

The formula, simplified, is: Minecraft sums the fill fraction of every slot (a slot holding 32 of a 64 stack counts as half), divides by the number of slots, scales that to 14, and adds 1 if the container holds anything. The takeaways for builders:

  • A nearly empty large chest still only reads 1, because the items are spread thin across 27 slots.
  • To get a clean strength of 1 out of a single hopper (5 slots) you need a precise small quantity of items in it.
  • Special blocks read other states: a cauldron outputs based on fluid level, a composter based on fill stage 0 to 8 mapping to strength, a jukebox outputs a value tied to which disc is playing, and an item frame outputs based on the rotation of the item inside it (0 to 7 rotations map to strengths).

The item frame readout is why combination locks work. Rotate an item in a frame to one of its 8 positions and the comparator reading the frame outputs a strength tied to that rotation. Only the correct rotation produces the strength that opens your door. Chain several frames for a multi-digit code, with no two-way wiring and no moving parts.

Practical circuit: a chest-empty detector

Here is a clean, useful build that puts the readout to work. It lights a lamp (or triggers anything) the moment a chest runs empty.

  1. Place your chest.
  2. Place a comparator behind it, back face pointing out of the chest, output facing away. Set it to compare mode (front torch off).
  3. Run the comparator output into a redstone line. While the chest holds items, this line carries strength 1 or higher.
  4. Invert the signal. Feed the line into a block with a redstone torch on the far side, or into another comparator in subtract mode fed by a constant signal. The inversion means: signal present equals lamp off, signal absent equals lamp on.
  5. Connect the inverted output to a redstone lamp. Now the lamp is dark while the chest has anything in it and lights up the instant the chest empties.

This same pattern, comparator reads container, output drives logic, is the backbone of item sorters, auto-smelters that stop when fuel runs out, and farms that pause when storage is full.

Practical circuit: a precise signal strength generator

Sometimes you need an exact strength, say 9, to feed a circuit. Two reliable methods:

  • Dust decay: Output strength 15 from a source and run it across exactly the right number of dust blocks. Six blocks of travel turns 15 into 9.
  • Subtract mode: Feed a comparator a known back signal and a known side signal. Back 15, side 6, subtract mode, output is 9. This is more compact and does not depend on physical distance.

The subtract method is the professional choice because it is tileable and does not eat horizontal space. Many complex redstone contraptions are, at heart, a grid of comparators producing and combining exact strengths.

A frequent mistake is forgetting that comparators do not boost signal. People wire a comparator at the end of a long dust line expecting fresh strength 15 and get whatever weak value survived the trip, minus any side input. If you need to restore strength, use a repeater, not a comparator. The comparator preserves or reduces strength, never increases it.

Compare vs subtract: choosing correctly

The mode you want depends on the question your circuit asks.

  • Use compare mode when you want to detect a threshold: "fire only when this input is at least as strong as that input." Compare passes the back signal through whenever the side does not exceed it, which makes it a clean greater-than-or-equal-to gate.
  • Use subtract mode when you want arithmetic: producing a specific reduced strength, building analog memory cells, or combining multiple signals into a calculated result.

A surprising amount of advanced redstone, redstone computers, calculators, and display drivers, is built almost entirely from comparators in subtract mode wired into adders and memory. The same block that tells you a chest is empty also does binary math at the heart of in-game CPUs.

Common failure modes

  • Output is always 0. A side input equals or exceeds the back input. In compare mode that zeroes the output, in subtract mode it subtracts everything away. Check what is feeding the sides.
  • Container reads lower than expected. Large containers spread items thin. A chest with one item reads 1, not something high. If you need a strong reading from few items, use a smaller container like a hopper or dropper.
  • Comparator does nothing. Its back is not actually facing the container or signal source, or you are feeding the side where you meant the back. The arrow on top of the comparator points toward the output, away from the rear input.
  • Mode seems inverted. The front torch state is opposite to what you assumed. Lit equals subtract, unlit equals compare. Right-click to toggle and watch the dust readout change.
  • Readout flickers. Items are actively flowing in and out of the container, changing its fill level every tick. Latch the value with a circuit if you need a stable reading, or read a buffer container that fills more slowly.

Why the comparator unlocks redstone

The repeater controls timing, the comparator controls information. The moment you can read how full a chest is, detect when a furnace finishes, lock a door with an item frame, or generate any exact strength on demand, redstone stops being switches and lamps and becomes a system that responds to the state of your world.

Build the chest-empty detector first. Watch the dust readout change as you add and remove items. Once you can predict the comparator's output before you place the dust, you understand signal strength, and almost every redstone build above the beginner level is within reach.


Sources & further reading: