Quick Navigation
BITRSHIFT Function
Summary
The BITRSHIFT function performs a bitwise right shift operation on a number, effectively dividing it by powers of 2 while discarding the remainder bits. This is useful for integer division by powers of 2 and binary manipulation tasks.
Syntax
BITRSHIFT(number, shift_amount)
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| number | Number |
Yes | The non-negative integer value to shift right (must be ≥0 and ≤2^48-1) |
| shift_amount | Number |
Yes | The number of positions to shift the bits right (integer, |shift| ≤53) |
Using the BITRSHIFT Function
BITRSHIFT is perfect for scenarios requiring fast integer division by powers of 2, binary data processing, or when working with bit flags and masks. Use positive shift_amount for right shifts (divide by 2^n) and negative values for left shifts (multiply by 2^n).
Common BITRSHIFT Examples
Basic Right Shift
=BITRSHIFT(13,2)
Shifts 13 (binary 1101) right by 2 bits → 3 (binary 11). Equivalent to 13÷4=3.
Divide by 8 (3-bit shift)
=BITRSHIFT(100,3)
100 ÷ 8 = 12.5 → 12 (discards fractional bits).
Left Shift (Negative Value)
=BITRSHIFT(5,-1)
Shifts 5 left by 1 bit → 10 (equivalent to BITLSHIFT(5,1)).
Frequently Asked Questions
Common Errors and Solutions
#NUM!
Cause: Number > 2^48-1 or |shift_amount| > 53
Solution: Ensure number ≤ 281474976710655 and |shift| ≤ 53
#VALUE!
Cause: Non-numeric input
Solution: Use integers only for both arguments
#NUM!
Cause: Negative number argument
Solution: Number must be ≥ 0
Notes
- Right shift by n bits = divide by 2^n (integer division)
- Maximum number: 281,474,976,710,655 (2^48-1)
- Shift range: -53 to +53 bits
- Negative shift_amount performs left shift
- Available in Excel 2013 and later versions
Compatibility
Available in: Excel 2013, Excel 2016, Excel 2019, Excel 2021, Excel 365, Excel for Mac 2011+, Excel Online
Not available in: Excel 2010, Excel 2007, Excel 2003, Excel XP
Content last reviewed: December 9, 2025
Update frequency: As needed
Excel versions tested: Excel 2013+