Skip to content
Google Sheets

RIGHT function in Google Sheets

Returns a substring from the end of a specified string.

=RIGHT(string, [number_of_characters])

RIGHT syntax and parameters

Two arguments, one required.

  • stringstringRequired

    The string from which the right portion will be returned.

  • number_of_charactersnumberOptional

    [ OPTIONAL - 1 by default ] - The number of characters to return from the right side of string.

RIGHT examples

Formulas you'll actually reuse.

  1. The last four digits of a card or account number:

    =RIGHT(A2, 4)

    Result"4242"

  2. The domain part of an email — everything after the @:

    =RIGHT(B2, LEN(B2) - FIND("@", B2))

    Result"example.com"

RIGHT in Excel

Same name — your formula ports as-is.

Try RIGHT in the playground

Edit the example — nothing to install.

Preloaded with the RIGHT formula from Example 1 — change anything and watch it respond.

Loading the editor…