BITRSHIFT function

BITRSHIFT shifts a number's bits rightward by a specified amount, returning an integer and effectively dividing by powers of 2.

=BITRSHIFT(number, shift_amount)

Generate a BITRSHIFT formula

Describe what you need. The generator will reach for BITRSHIFT where BITRSHIFT is the right tool, and tell you when it is not.

How to get a better answer
  • Name your columns by letter and by header: "column F (Net Value)" beats "the amount column".
  • State every condition, including the negatives — "not cancelled" changes the formula's shape.
  • Say where the data starts if it is not row 1, and whether it will grow.
  • Check the settings above match your spreadsheet: the wrong argument separator is a syntax error on your machine.

Arguments

How BITRSHIFT reads its arguments
numberrequiredshift_amountrequiredBITRSHIFT
ArgumentRequiredDescription
numberRequiredThe numeric value to shift; decimal values are truncated to integers before the operation begins.
shift_amountRequiredA non-negative integer indicating how many bit positions to shift right; excessive values (typically >31) result in zero or an error.

Returns

An integer representing the value after all bits have been shifted right by the specified positions.

Availability

Excel: All · Google Sheets: Supported

Worked examples

1. Halve a monthly budget allocation

CategoryMonthBudgetedActualVariance
GroceriesJan400420-20
=BITRSHIFT(400, 1)

Result: 200

The groceries budgeted amount of 400 is shifted right by 1 bit position, which mathematically equals 400 ÷ 2. In binary, 110010000 becomes 11001000, yielding 200. This is useful for calculating half-allocations or contingency reserves.

2. Quarter an entertainment spending overage

CategoryMonthBudgetedActualVariance
EntertainmentJan100152-52
=BITRSHIFT(152, 2)

Result: 38

The actual entertainment spending of 152 is shifted right 2 positions, equivalent to dividing by 4. Binary 10011000 becomes 00100110 (38). This determines a proportional budget reduction for the next month based on current overspend.

3. Reduce total variance by one-eighth

CategoryMonthBudgetedActualVariance
Total VarianceJan00320
=BITRSHIFT(320, 3)

Result: 40

A cumulative variance of 320 is shifted right by 3 positions, dividing by 8. The binary 101000000 becomes 101000 (40). This calculates the reserve amount to set aside when variance has accumulated across multiple budget categories.

Common errors

Which BITRSHIFT error are you seeing?
BITRSHIFT returned an error#VALUE!
Verify both arguments point to numeric values; use specific cells like B2 (budgeted) or D2 (actual) rather than A2 (category text).
#NUM!
Provide a non-negative integer for shift_amount; if you need to shift left (multiply by powers of 2), use BITLSHIFT instead.
#NUM!
Reduce shift_amount to a reasonable value; shifts beyond 31 usually zero out the entire number, so verify this is your intended outcome before proceeding.
ErrorWhy it happensHow to fix it
#VALUE!One or both arguments contain non-numeric data—for example, referencing a text category name like 'Groceries' instead of a numeric cell.Verify both arguments point to numeric values; use specific cells like B2 (budgeted) or D2 (actual) rather than A2 (category text).
#NUM!The shift_amount is negative, such as BITRSHIFT(200, -1), which violates the bit-shift rules that require non-negative shift distances.Provide a non-negative integer for shift_amount; if you need to shift left (multiply by powers of 2), use BITLSHIFT instead.
#NUM!The shift_amount exceeds the implementation limit (typically 31-63 bits), pushing all bits beyond the register boundary and producing an overflow condition.Reduce shift_amount to a reasonable value; shifts beyond 31 usually zero out the entire number, so verify this is your intended outcome before proceeding.

Tips and when to use something else

  • BITRSHIFT(x, n) is mathematically equivalent to ⌊x ÷ 2ⁿ⌋ with integer truncation; use it for rapid halvings and quarterings in budget scaling.
  • Use BITLSHIFT for the opposite operation (left shift, multiplying by powers of 2) when you need to double, quadruple, or scale budget amounts upward.
  • BITRSHIFT truncates decimals before shifting; if your budget contains cents or fractional values, round first with ROUND() to preserve precision.
  • For verification, convert results to binary with DEC2BIN to visually confirm that bits have shifted the correct number of positions.

Frequently asked questions

Can BITRSHIFT replace division by 2, 4, or 8 in my budget sheet?
Yes—BITRSHIFT(x, 1) equals x÷2, BITRSHIFT(x, 2) equals x÷4, and BITRSHIFT(x, 3) equals x÷8. The result is always an integer, with fractions discarded. Performance may be marginally faster than arithmetic division in some spreadsheet engines, though modern optimizations often make them equivalent.
What happens if I shift by more bit positions than the number contains?
The result becomes 0 once all bits have shifted away. For example, BITRSHIFT(15, 10) returns 0 because the value 15 (1111 in binary) has only 4 significant bits, and shifting 10 positions eliminates everything.
Does BITRSHIFT work with negative budget numbers?
Yes, but behavior varies by engine. Most spreadsheets perform arithmetic right shift, preserving the sign—negative numbers remain negative. For example, BITRSHIFT(-16, 1) returns -8. Consult your engine's documentation if handling of negative variance values matters to your model.
Should I use BITRSHIFT instead of regular division for performance?
In theory, bit operations are faster at the CPU level, but modern spreadsheet optimizations often eliminate this difference. Use BITRSHIFT when working with binary-encoded budget data or when the bit-level logic makes your formula more readable to other analysts—not primarily for speed.

Need a different formula?

The full generator is not scoped to one function — describe any spreadsheet problem and it will pick.

Open the formula generator

Reviewed 2026-09-17