A redstone comparator is a block that can produce an output signal from its front by reading chests, lecterns, beehives and similar blocks, or repeat a signal without changing its strength. It can also be set to either stop outputting a signal when its side input receives a stronger one (front torch off), or subtract its side input's signal strength from its output (front torch on).
Obtaining[]
Natural generation[]
Redstone comparators generate in ancient cities.
Breaking[]
A redstone comparator can be broken instantly with any tool, or by hand, and drops itself as an item.
Block | Redstone Comparator | |
---|---|---|
Hardness | 0 | |
Breaking time (secs) | ||
Default | 0.05 |
A redstone comparator is removed and dropped as an item if:
- its attachment block is moved, removed, or destroyed;
- water flows into its space;[Java Edition only]
- a piston tries to push it or moves a block into its space.
If lava flows into a redstone comparator's space, the redstone comparator is destroyed without dropping as an item.
Crafting[]
Ingredients | Crafting recipe |
---|---|
Redstone Torch + Nether Quartz + Stone |
Usage[]
A redstone comparator can be placed on the top of any opaque block with a solid full-height top surface (including upside-down slabs and upside-down stairs). In Bedrock Edition, a comparator can also be placed on walls and fences. For more information about placement on transparent blocks, see Opacity/Placement.
The redstone comparator has a front and a back — the arrow on the top of the comparator points to the front. When placed, the comparator faces away from the player. The comparator has two miniature redstone torches at the back and one at the front. The back torches turn on when the comparator's output is greater than zero (the arrow on top also turns red). The front torch has two states that can be toggled by using the comparator:
- Down and unpowered (indicating the comparator is in "comparison mode")
- Up and powered (indicating the comparator is in "subtraction mode")
The redstone comparator can take a signal strength input from its rear as well as from both sides. Side inputs are accepted only from redstone dust, block of redstone, redstone repeaters, other comparators, and observers in specific scenarios. The redstone comparator's front is its output.
It takes 1 redstone tick (2 game ticks, or 0.1 seconds barring lag) for signals to move through a redstone comparator, either from the rear or from the sides. This applies to changing signal strengths as well as simply to turning on and off.
Redstone comparators check their power state before their scheduled ticks update. This results in redstone comparators not usually responding to 1-tick fluctuations of power or signal strength — for example, a 1-clock input is treated as always off from the side, and always on from the rear. This happens because the signal changes back to its original state before the redstone comparator checks its input states. However, certain setups such as powering any input with two separate observer pulses at the same time will cause a redstone comparator to respond to 2 gametick pulses.
The redstone comparator has four functions: maintain signal strength, compare signal strength, subtract signal strength, and measure certain block states (primarily the fullness of containers).
Maintain signal strength[]
A redstone comparator with no powered sides outputs the same signal strength as its rear input.
Compare signal strength[]

Comparators in comparison mode.
A redstone comparator in comparison mode (front torch down and unpowered) compares its rear input to its two side inputs. If either side input is greater than the rear input, the comparator output turns off. If neither side input is greater than the rear input, the comparator outputs the same signal strength as its rear input.
The formula for calculating the output signal strength is as follows:
output = rear × [left ≤ rear AND right ≤ rear]
Subtract signal strength[]

The greatest of the side inputs A and C is subtracted from the rear input B, outputting 1. If either A or C were greater than B, it would output 0.
A redstone comparator in subtraction mode (front torch up and powered) subtracts the signal strength of the higher side input from the signal strength of the rear input.
output = max(rear − max(left, right), 0)
For example: if the signal strength is 6 at the left input, 7 at the right input and 4 at the rear, the output signal has a strength of max(4 − max(6, 7), 0) = max(4−7, 0) = max(−3, 0) = 0.
If the signal strength is 9 at the rear, 2 at the right input and 5 at the left input, the output signal has a strength of max(9 − max(2, 5), 0) = max(9−5, 0) = 4.
Measure block state[]
A redstone comparator treats certain blocks behind it as power sources and outputs a signal strength proportional to the block's state. The comparator may be separated from the measured block by an opaque block. However, in Java Edition, if the opaque block is powered to signal strength 15, then the comparator outputs 15 no matter the fullness of the container.[1]
Fullness of containers[]
A redstone comparator can output a signal indicating how full a container is. (0 for empty, 15 for full, etc.) The table on the right is described more in detail, later in this section.
Containers that can be measured by a comparator include:
- Furnace
- Blast Furnace
- Smoker
- Brewing Stand
- Hopper
- Minecart with Hopper on top of a detector rail
- Dispenser
- Dropper
- Chest
- Trapped Chest
- Minecart with Chest on top of a detector rail
- Barrel
- Large chest
- Large trapped chest
- Shulker Box (any color)
Generally speaking, the comparator output signal strength represents the average fullness of the slots, based on how many of that item form a full stack (64, 16, or 1 for non-stackable items).
The Minimum Items for Container Signal Strength table (right) shows the minimum full-stack-equivalent (FSE) to produce different signal strengths from common containers. A full-stack-equivalent quantifies how many normal 64-stackable items are needed to output a corresponding signal strength. The 's' is a constant 64, with the additional amount needed following after.
One may also consider the terms: cumulative-weight or weighted-sum instead of full-stack-equivalent.
Items that stack to a max of 16 (snowballs, signs, ender pearls, etc.), contribute +4 to the full-stack-equivalent for each unity (count of 1 item). Similarly, items that stack to 1 (minecart, boat, etc.) contribute +64, and items that stack to 64 contribute +1.
Example 1: 3 ender pearls will contribute a 3 x 4 = 12 full-stack-equivalent.
Example 2: 16 ender pearls and 60 redstone dust contributes a 16x4 + 60x1 = 124 full-stack-equivalent.
Example 3: 1 minecart and 60 redstone dust contributes a 1x64 + 60x1 = 124 full-stack-equivalent.
Example 4: To produce a signal strength of 10 from a hopper, one requires a full-stack-equivalent of at least 3s + 14 = 206 but strictly less than than 3s + 37 = 229. This can be done with 3 minecarts, and 14 dirt.
When a comparator measures a large chest or large trapped chest, it measures the entire large chest (54 slots), not just the half directly behind the comparator. A chest or trapped chest that cannot be opened (either because it has an opaque block, ocelot, or cat above it) always produces an output of 0 no matter how many items are in the container — shulker boxes can always be measured, even if they cannot open.
- Calculating signal strength from items
- When a container is empty, the output is off.
- When it is not empty, the output signal strength is calculated as follows:
signal strength = floor(1 + ((sum of all slots' fullnesses) / (number of slots in container)) × 14)
fullness of a slot = number of items in slot / max stack size for this type of item
- Example: 300 blocks in a dispenser (which has 9 slots), where each block stacks to a maximum of 64 has a 300 full-stack-equivalent. This produces an output with a signal strength of 8:
1 + ((300 items / 64 items per slot) / 9 slots) × 14 = 8.292, floored is 8
- Calculating items from signal strength
- It can be useful in redstone circuits to use containers with comparators to create signals of a specific strength. The number of items required in a container to produce a signal of desired strength is calculated as follows:
items required = max(desired signal strength, roundup((total slots in container × 64 / 14) × (desired signal strength − 1)))
- Example: To use a furnace (which has 3 slots) to create a strength 9 signal, players need 110 items:
max(9, (3×64/14) × (9−1)) = 109.714, rounded up is 110
Miscellaneous[]

Comparators used to measure containers.
Some non-container blocks can also be measured by a redstone comparator:
- A hive or nest outputs a signal strength equal to the amount of honey in the hive/nest.
- A cake outputs a signal strength relative to the amount of cake remaining. Each slice is worth 2 signal strength, with 7 total slices, for an output of 14 for a full cake.

Cauldron signal strength
- A cauldron outputs different signal strengths depending on how much water or powdered snow is inside. From completely empty to completely full, the output values are 0, 1, 2, and 3. If lava or powder snow is inside, the strength is always 3.

Composter signal strength
- A composter outputs different signal strengths depending on the level inside. From completely empty to completely full, the output values are 0, 1, 2, 3, 4, 5, 6, 7 and 8.
- A command block stores the "success count" of the last command executed, which represents the number of times the most recently used command of this command block succeeded. A "success" is defined by the command's success conditions: if a red error message is returned in the chat, the command was not successful.
- Most commands can succeed once per execution, but certain commands (such as those that accept players as arguments) can succeed multiple times, and the comparator outputs the number of times it succeeded (maximum 15 when sent to redstone dust, but in the code it is able to go up to the 32-bit integer limit, and can be used in contraptions with no redstone dust with those values).
- A command block continues to store the success count of the last command executed until it executes its command again, thus the comparator continues to output the same signal strength even after the command block is no longer being activated (it doesn't turn off when the signal to the command block turns off).
- An end portal frame outputs a full signal of 15 if it contains an eye of ender and zero otherwise.

A comparator can measure the presence and rotation of an item frame's contents.
- A comparator can measure the state of an item frame's contents. An item frame comparator outputs 0 if the item frame is empty, or 1 to 8 for any item depending on its rotation: 1 at initial placement, plus 1 for each 45° of rotation for a maximum of 8.
- For an item frame that holds a map, a unit of rotation is 90° instead of 45°, but a comparator still outputs power levels 1 to 8. It takes two full rotations to cycle through all comparator outputs, and each orientation of the map corresponds to two output levels that differ by 4.
- The comparator must be placed behind the block the item frame is attached to, facing away from the item frame. The block must be a full block, and the item frame cannot be submerged in water. Having a sign in the same block as the item frame will prevent the frame from sending a signal as well.[Java Edition only]
- A jukebox outputs a signal strength indicating which music disc is currently playing. See the Minimum Items for Container Signal Strength table above.
- A lectern outputs a signal strength that depends on what page the player is currently on. The calculation used is:
signal strength = floor(1 + ((current page - 1) / (number of pages in book - 1)) × 14)
- This results in page 1 having a signal strength of 1, and the last page having a signal strength of 15. The exception is a single page book, which will output a signal strength of 15.
- For example, a book with 15 pages will output a signal equal to the current page number. A book with 5 pages will output signal strengths of 1, 4, 8, 11 and 15 for the different pages. A book with 100 pages will have the signal strength increase to the next level on pages 1, 9, 16, 23, 30, 37, 44, 51, 58, 65, 72, 79, 86, 93 and 100.
- A respawn anchor outputs a signal strength of 0, 3, 7, 11, or 15, depending on the "charged" value.
- A sculk sensor outputs a signal strength depending on the type of vibration that is detected.
- A chisled bookshelf outputs a signal strength between 1 and 6 indicating the last slot interacted with. When no slot has been interacted with yet, it outputs 0.
Sounds[]
Generic[]
Sound | Subtitles | Source | Description | Resource location | Translation key | Volume | Pitch | Attenuation distance |
---|---|---|---|---|---|---|---|---|
Block broken | Blocks | Once the block has broken | block | subtitles | 1.0 | 0.8 | 16 | |
Block placed | Blocks | When the block is placed | block | subtitles | 1.0 | 0.8 | 16 | |
Block breaking | Blocks | While the block is in the process of being broken | block | subtitles | 0.25 | 0.5 | 16 | |
None[sound 1] | Entity-Dependent | Falling on the block with fall damage | block | None[sound 1] | 0.5 | 0.75 | 16 | |
Footsteps | Entity-Dependent | Walking on the block | block | subtitles | 0.15 | 1.0 | 16 |
Sound | Source | Description | Resource location | Volume | Pitch |
---|---|---|---|---|---|
Blocks | Once the block has broken | dig | 1.0 | 0.8-1.0 | |
Blocks | When the block is placed | dig | 1.0 | 0.8 | |
Blocks | While the block is in the process of being broken | hit | 0.23 | 0.5 | |
Players | Falling on the block with fall damage | fall | 0.4 | 1.0 | |
Players | Walking on the block | step | 0.3 | 1.0 | |
Players | Jumping from the block | jump | 0.12 | 1.0 | |
Players | Falling on the block without fall damage | land | 0.18 | 1.0 |
Unique[]
Sound | Subtitles | Source | Description | Resource location | Translation key | Volume | Pitch | Attenuation distance |
---|---|---|---|---|---|---|---|---|
Comparator clicks | Blocks | When a comparator is set to subtraction mode | block | subtitles | 0.3 | 0.55 | 16 | |
Comparator clicks | Blocks | When a comparator is set to comparison mode | block | subtitles | 0.3 | 0.5 | 16 |
Sound | Source | Description | Resource location | Volume | Pitch |
---|---|---|---|---|---|
Blocks | When a comparator is set to subtraction mode | block | 0.2 | 0.55 | |
Blocks | When a comparator is set to comparison mode | block | 0.2 | 0.5 |
Data values[]
ID[]
Name | Identifier | Form | Translation key |
---|---|---|---|
Redstone Comparator | comparator | Block & Item | block.minecraft.comparator |
Name | Identifier |
---|---|
Block entity | comparator |
Redstone Comparator | Identifier | Numeric ID | Form | Item ID[i 1] | Translation key |
---|---|---|---|---|---|
Unpowered block | unpowered_comparator | 149 | Block & Ungiveable Item[i 2] | Identical[i 3] | — |
Powered block | powered_comparator | 150 | Block & Ungiveable Item[i 2] | Identical[i 3] | — |
Item | comparator | 522 | Item | — | item.comparator.name |
Name | Savegame ID |
---|---|
Block entity | Comparator |
Block states[]
Name | Default value | Allowed values | Description |
---|---|---|---|
facing | north | east north south west | The direction from the output side to the input side of the comparator, or the opposite from the direction the player faces while placing the comparator. |
mode | compare | compare subtract | Specifies the current mode of the redstone comparator. |
powered | false | false true | True if the redstone comparator is being powered. |
Name | Metadata Bits | Default value | Allowed values | Values for Metadata Bits |
Description |
---|---|---|---|---|---|
direction (Deprecated) | 0x1 0x2 | 0 | 0 1 2 3 | 0 1 2 3 | The direction the repeater directs power.
|
minecraft:cardinal_direction | Not Supported | south | east north south west | Unsupported | The direction from the output side to the input side of the comparator, or the opposite from the direction the player faces while placing the comparator. |
output_lit_bit | 0x8 | false | false true | 0 1 | True if the redstone comparator is being powered. |
output_subtract_bit | 0x4 | false | false true | 0 1 | Specifies the current mode of the redstone comparator. |
Block data[]
A redstone comparator has a block entity associated with it that holds additional data about the block.
- Block entity data
- Tags common to all block entities
- OutputSignal: Represents the strength of the analog signal output of this redstone comparator.
Advancements[]
Icon | Advancement | In-game description | Parent | Actual requirements (if different) | Resource location |
---|---|---|---|---|---|
![]() | The Power of Books | Read the power signal of a Chiseled Bookshelf using a Comparator | Adventure | Place a comparator on any side of a chiseled bookshelf or the chiseled bookshelf against a comparator to trigger the advancement. | adventure/read_power_of_chiseled_bookshelf
|
Video[]
History[]
For a more in-depth breakdown of changes to repeater textures and models, including a set of renders for each state combination, see /Asset history
Java Edition | |||||||
---|---|---|---|---|---|---|---|
November 24, 2012 | Jeb stated that there may be a "capacitor" in Minecraft. | ||||||
December 27, 2012 | Dinnerbone released pictures of the first version of the "comparator", stating it was a replacement for the "capacitor" idea that has variable, alternate inputs. | ||||||
January 2, 2013 | Dinnerbone released one more picture of the comparator. The picture itself showing a digital-to-analog converter, using the comparator as the main block. | ||||||
1.5 | 13w01a | ![]() ![]() ![]() ![]() ![]() | |||||
Redstone comparators have 0 delay. At this point, block ID 149 was used for unpowered comparators, and block ID 150 for powered comparators. | |||||||
13w01b | A delay of 1 game tick (1⁄2 redstone tick) has now been added to redstone comparators to fix bugs. | ||||||
The ability to measure containers to redstone comparators has now been added. | |||||||
13w02a | ![]() ![]() ![]() ![]() | ||||||
The algorithm for measuring containers has now been changed so that redstone comparators output a signal with as few as 1 item in the container. | |||||||
13w02b | Redstone comparators now treat large chests as a single container. | ||||||
13w03a | Redstone comparators now output success count of command blocks. | ||||||
Redstone comparators now measure container minecarts on detector rails. | |||||||
13w04a | Redstone comparators now measure jukeboxes. | ||||||
13w05a | Redstone comparators no longer cause constant block updates. The delay has now been made consistent, and side input no longer causes a pulse output. | ||||||
Block 150 (later powered_comparator ) is no longer used; powered state is now represented by the 8s bit on block 149 (later unpowered_comparator ). | |||||||
13w05b | Redstone comparator delay has now been changed from 1 game tick (1/2 redstone tick) to 2 game ticks (1 redstone tick). | ||||||
13w09c | The redstone signal strength from a redstone comparator next to a brewing stand with 3 water bottles in it is now the same as one with 3 water bottles and 1 ingredient in it. | ||||||
1.6.1 | 13w18a | Redstone comparators now measure cauldrons and end portal frames. | |||||
1.8 | 14w04a | Redstone comparators now measure item frames. | |||||
14w10a | The torches under redstone comparators have now been shortened, which has changed the underside appearance from ![]() ![]() ![]() ![]() ![]() | ||||||
14w25a | ![]() ![]() ![]() ![]() | ||||||
Comparators set to subtract mode appear to be powered as well regardless of incoming power. The subtracting-only model still exists and can be achieved through /setblock . | |||||||
14w25b | ![]() ![]() | ||||||
Comparators set to subtract by hand now appear normally again. | |||||||
14w28a | Redstone comparators now measure cakes. | ||||||
1.9 | 15w42a | With the addition of the blaze powder fuel slot, brewing stands now have 5 slots instead of 4. Their original comparative power values from redstone comparators are listed below:
| |||||
15w47a | Redstone comparators' side inputs now take power from redstone blocks. | ||||||
1.13 | 17w47a | All 3 IDs for the redstone comparator have now been merged into one ID: comparator .
| |||||
Redstone comparators now render their underside, which has changed their undersides from ![]() ![]() | |||||||
Prior to The Flattening, these blocks' numeral IDs were 149 and 150, and the item's 404. | |||||||
As a result, the formerly unused comparator ID is now technically used again, due to both unpowered and powered versions being merged into a single comparator block ID. | |||||||
1.14 | 18w43a | ![]() ![]() ![]() ![]() ![]() | |||||
19w02a | Redstone comparators now measure lecterns. | ||||||
19w03a | Redstone comparators now measure composters. | ||||||
19w12b | Redstone comparators can now be placed on glass, ice, glowstone and sea lanterns. | ||||||
1.15 | 19w34a | Redstone comparators now measure how much honey is inside bee hives and bee nests. | |||||
1.16 | 20w06a | The way to calculate the input signals of redstone comparators has now been changed. | |||||
20w11a | The changes to the way of calculating the input signals of redstone comparators from 20w06a have now been reverted. | ||||||
20w16a | Redstone comparators now measure Pigstep music discs in jukeboxes. | ||||||
1.17 | 20w45a | Redstone comparators now measure lava cauldrons. | |||||
20w46a | Redstone comparators now measure powder snow cauldrons. | ||||||
1.18 | 21w41a | ![]() ![]() | |||||
1.19 | 22w13a | Redstone comparators now generate as part of ancient cities. | |||||
1.20 (Experimental) | 22w42a | Redstone comparators now measure chiseled bookshelves. | |||||
1.20.2 | 23w33a | Redstone comparators now use stone sounds instead of wood sounds.[2] | |||||
Pocket Edition Alpha | |||||||
v0.14.0 | build 1 | ![]() ![]() ![]() ![]() ![]() | |||||
Pocket Edition | |||||||
1.0.0 | alpha 0.17.0.1 | Redstone comparators now measure end portal frames. | |||||
1.0.5 | alpha 1.0.5.0 | Redstone comparators now output success count of command blocks. | |||||
1.1.0 | alpha 1.1.0.0 | Redstone comparators now measure shulker boxes. | |||||
Bedrock Edition | |||||||
1.2.0 | beta 1.2.0.2 | Redstone comparators now measure jukeboxes. | |||||
Redstone comparators now render their underside, which has changed their undersides from ![]() ![]() | |||||||
1.10.0 | beta 1.10.0.3 | ![]() ![]() ![]() ![]() ![]() | |||||
1.11.0 | beta 1.11.0.1 | Redstone comparators now measure smokers, blast furnaces, lecterns and composters. | |||||
1.18.10 | beta 1.18.10.20 | ![]() ![]() | |||||
1.20.30 | beta 1.20.30.20 | Redstone comparators now use the minecraft:cardinal_direction block state instead of direction . | |||||
Legacy Console Edition | |||||||
TU19 | CU7 | 1.12 | Patch 1 | 1.0.1 | ![]() ![]() ![]() ![]() ![]() | ||
TU31 | CU19 | 1.22 | Patch 3 | Redstone comparators can now measure item frames. | |||
1.90 | ![]() ![]() ![]() ![]() ![]() | ||||||
New Nintendo 3DS Edition | |||||||
0.1.0 | ![]() ![]() ![]() ![]() ![]() |
Redstone comparator "items"[]
- The following content is transcluded from Technical blocks/Redstone Comparator.
Java Edition | |||||
---|---|---|---|---|---|
1.5 | 13w01a | Redstone comparators have extra, unobtainable item forms corresponding to their block IDs. They can be obtained via the /give command or inventory editors with numeric item IDs 149 and 150. | |||
1.7.2 | 13w37a | The direct item forms of redstone comparators have been removed from the game. They can no longer exist as items in any way, only as placed blocks. | |||
Pocket Edition Alpha | |||||
? | Redstone comparators probably exist as an item. |
Appearances[]
Unpowered Comparator[]
Java Edition | |||||
---|---|---|---|---|---|
1.5 | 13w01a | ![]() | |||
13w02a | ![]() | ||||
This is due to major texture storage changes in this version. |
Powered Comparator[]
Java Edition | |||||
---|---|---|---|---|---|
1.5 | 13w01a | ![]() | |||
13w02a | ![]() | ||||
This is due to major texture storage changes in this version. | |||||
Bedrock Edition | |||||
? | ![]() | ||||
? | ![]() |
Names[]
Unpowered Comparator[]
- 13w01a - 13w25b: [Has no defined name, rendering a minimum-length text box if highlighted]
- 13w25c - 13w36b: tile.comparator.name
When given using the /give
command, it is announced as tile.comparator.name.
Powered Comparator[]
- 13w01a - 13w25b: [Has no defined name, rendering a minimum-length text box if highlighted]
- 13w25c - 13w36b: tile.comparator.name
When given using the /give
command, it is announced as tile.comparator.name.
Issues[]
Issues relating to "Redstone Comparator" are maintained on the bug tracker. Report issues there.
Trivia[]
- Comparators do not emit redstone particles when powered, unlike redstone torches and repeaters.[5]
Gallery[]
-
Dinnerbone showing how comparators work.
-
Dinnerbone showing how comparators work.
-
Dinnerbone showing how comparators work.
-
A contraption incorporating comparators.
-
Comparators in action.
-
Output specific signals.
-
Another comparator in use.
-
Rotating the torch in the item frame adjusts the comparator's output.
References[]
- ↑ MC-64394 (resolved as "Works As Intended")
- ↑ MC-182820 — resolved as "Fixed".
- ↑ https://youtu.be/UgHbUFnr2NE?t=2m50s
- ↑ https://youtu.be/Ib83drtXv6Y?t=3m40s
- ↑ MC-51692 — resolved as "Works As Intended".