RPN Programmer's Calculator

Mode
Sign
Word size
Entry base
Float precision

    HEX
    DEC
    OCT
    BIN

    Help

    How RPN works

    RPN (Reverse Polish Notation) puts the numbers first and the operation last, so there's no = key and no brackets. Numbers wait on a stack: X is the newest, Y the one before it.

    An operation takes Y and X and leaves the result in X. A number you're typing counts as X, so you don't need Enter before an operation. For example, (3 + 4) × 5 is

    3 Enter 4 + 5 × → 35

    Int mode works on 8–64-bit integers with live Hex, Dec, Oct and Bin views. Float mode works on decimals, rounded to 15 digits unless you choose IEEE-754, and adds powers, roots, logarithms, factorials, π and e. For two-number functions, yx raises Y to the power X, and x√y takes the X-th root of Y. Switches and entries that change values show a warning, and Undo (↶) takes back any change. A key that doesn't apply, such as 2 in Bin entry, flashes red and the status line says why. Your settings are remembered, and your stack survives a reload of the tab.

    To copy X, press Ctrl+C or the copy button. In Int mode you can also click a Hex, Dec, Oct or Bin row to copy that form, such as 0xFF. Ctrl+V pastes a number as a new X. Without a 0x, 0o or 0b prefix it's read in the entry base. Digits are grouped for reading, with commas in Dec (1,234,567) and spaces in the other bases. Copies leave the separators out, and pastes ignore them.

    Keyboard shortcuts

    With a mouse, hover over a key to see its shortcut.

    0–9 A–FDigits valid in the entry base
    .Decimal point (Float mode), also the numpad's decimal key
    + - * /Add, subtract, multiply, divide
    %Remainder of Y ÷ X (MOD)
    NChange sign of the number being typed, or of X
    EnterEnter
    BackspaceDelete last digit, or Drop if not typing
    DeleteDrop
    EscClear entry
    XSwap X and Y
    ↓ ↑Roll down, roll up
    & | ^ ~AND, OR, XOR, NOT (Int mode)
    < >Shift Y left, right by X bits (Int mode)
    ^ Ryx, x√y (Float mode)
    S Qx2, √x (Float mode)
    I !1/x, n! (Float mode)
    L Kln, ex (Float mode)
    G Hlog, 10x (Float mode)
    T Ylog2, 2x (Float mode)
    P Jπ, e (Float mode)
    Ctrl+CCopy X (when no text is selected)
    Ctrl+VPaste a number as a new X
    U Ctrl+ZUndo
    ?Show or hide this help