Skip to main content
← All Guides
Redstone · Mechanic · Java & Bedrock

How to Use a Redstone Comparator

The comparator is the redstone block that reads things. Point a container at it and it outputs a signal that grows with how full the container is, from 0 to 15. That one trick powers item sorters, full-chest alarms and clocks.

Container
Comparator
015
Output signal
Compare modeSubtract mode
A comparator reads how full a container is and outputs a redstone signal from 0 (empty) to 15 (full). Watch the barrel fill and the signal climb.

The two modes

Right-click the comparator to flip between them. The front torch tells you which mode you are in.

Compare (torch off)
Passes the back signal straight through, unless a stronger signal comes in from the side, in which case it outputs nothing.
Subtract (torch on)
Takes the back signal and subtracts the stronger of the two side inputs, so it outputs back minus side.

What it can read

Behind a container, the output strength equals how full that container is.

Hoppers & droppers
Furnaces & smelters
Brewing stands
Cake slices left
Cauldron level
Lectern page number

How the signal scales

Signal strength tracks fullnessnot item count alone. A single item in a double chest still gives a signal of 1; you need it almost completely full to reach 15. Stack a comparator on a chest of unstackable items and even a few of them push the signal up fast, which is the trick behind compact item sorters.

Quick answers

What does a redstone comparator do?

It reads how full a container is, or the state of certain blocks, and turns that into a redstone signal from 0 to 15. It can also compare or subtract two signals. Unlike a repeater it does not need to be powered to send an output.

How do you switch a comparator to subtract mode?

Right-click it. The front torch lights up to show subtract mode; right-click again to go back to compare mode (front torch off).

What can a comparator read?

Container fullness (chest, barrel, hopper, dropper, dispenser, furnace, brewing stand, shulker box), plus cake slices, cauldron and composter levels, a lectern page, beehive honey, a jukebox disc, item frame rotation and the end portal frame.

How does a comparator measure a chest?

The signal scales with how full the container is. A single item gives a weak signal of 1, and a completely full double chest gives the maximum of 15. That is how item sorters and full-storage alarms work.

Comparator vs repeater, what is the difference?

A repeater delays, repeats and can lock a signal, and only passes power forward. A comparator reads blocks and compares or subtracts signals, keeps signal strength instead of resetting it to 15, and outputs on its own.

Which side of a comparator is the output?

The end with the single front torch (where the arrow points) is the output. The two inputs come into the back and the side.
Database →
Comparator & redstone
Look up the comparator and every redstone component.
Guide →
Make a chest
The container a comparator reads most often.

Two modes, and a container reader

Compare mode passes or blocks

In its default mode the comparator lets the back signal through only if it is stronger than whatever comes in the sides. That is the whole comparison: it is not a logic gate you configure, it is a gate that answers one question about signal strength.

Subtract mode does arithmetic

Click it and the front torch lights, and now the output is the back signal minus the strongest side signal. Chaining two subtract comparators is how most analogue redstone counts, and it is the reason a comparator is worth understanding before a repeater.

It reads what is behind it

Point one at a chest, a furnace, a hopper, a cauldron, a lectern or a beehive and it outputs a level based on how full that block is. Almost every automatic system that reacts to storage is built on that single behaviour.

Blocks and items in this guide

Redstone Block in MinecraftRedstone BlockBrewing Stand in MinecraftBrewing StandShulker Box in MinecraftShulker BoxComparator in MinecraftComparatorItem Frame in MinecraftItem FrameDispenser in MinecraftDispenserCauldron in MinecraftCauldronRedstone in MinecraftRedstone

All 8 of these are named in the guide above, starting with Redstone Block. Look them up in the item database.

More guides on this site

Guides that go with this one

How to Make a Chiseled Bookshelf in MinecraftA chiseled bookshelf stores up to six books in six slots and outputs a redstone signal. Here is the recipe,...How to Use a Lectern with Redstone in MinecraftA lectern plus a comparator turns the page you are on into a redstone signal, so flipping pages selects...How to Use a Daylight Sensor in MinecraftA daylight sensor outputs a redstone signal from sky light, strongest at noon and zero at night. Right-click...How to Use a Redstone Repeater in MinecraftA redstone repeater delays a signal by 1 to 4 ticks, boosts it to full strength, makes it one-way, and can be...How to Make a Jukebox in MinecraftA jukebox plays your music discs. Here is the recipe, how to play and eject a disc, where music discs come...How to Use the Crafter Block in MinecraftThe 1.21 Crafter auto-crafts a recipe on a redstone pulse. Here is how to load its grid, disable slots,...

Related tools & databases

Tool
Minecraft Tools
Calculators and generators for servers and players.
Database
Item Database
Every item with its stats, IDs, recipes and uses.
Guides
More Farms & Redstone guides
Auto farms, contraptions and every redstone component explained.