Text · extract from the right · Nov 2026

The RIGHT function,
measured & explained.

Syntax, a live playground, a measured position gallery, the negative-count trap, and a sourced error library: extracting text from the right.

D1
fx
=RIGHT(A2, 3)
0
measured gallery rows
0
sourced errors fixed
0
platforms checked
// 01 — Anatomy

How RIGHT works

Returns the last num_chars characters of text. It mirrors LEFT: negative counts are #VALUE!, zero returns empty.

=RIGHT(text, [num_chars])
textThe string to extract from.
num_charsHow many characters to take from the end; defaults to 1.
over-lengthAsking for more than exists returns the whole string.
.bool-moat td.res-text{color:var(--cyan);font-weight:700;font-family:var(--mono)}
// 02 — Extract from the right

What RIGHT actually returns

RIGHT returns the last num_chars characters of a text string, counting back from the end. It mirrors LEFT exactly. Every row was measured live in HyperFormula. Click any row to load it.

Position gallery — counts back from the end

ExpressionResultWhy
=RIGHT(A2,3)celLast 3 of Excel
=RIGHT(A2)lOmitted num_chars defaults to 1
=RIGHT(A2,10)ExcelLonger than the text: whole string
=RIGHT(A3,4)mulaLast 4 of Formula
=RIGHT(A4,2)upLast 2 of Lookup
=RIGHT("Hello",2)loWorks on a literal
=RIGHT(A2,2.9)elDecimal truncated to 2
=RIGHT(A5,1)bLast character of Lab

Edge cases

ExpressionResultWhy
=RIGHT(A2,0)""Zero characters: an empty string
=RIGHT(A2,-1)#VALUE!Negative count is an error
⚠ RIGHT mirrors LEFT. Same rules: default 1, over-length returns the whole string, negative is #VALUE!, decimals truncate. To drop the first n characters use RIGHT(text, LEN(text)-n).
// 03 — Try it live

Interactive RIGHT playground

Edit the table or type any formula — the engine evaluates instantly. Load a preset to see RIGHT take a default single character, return the whole string when over-length, and slice from the end.

A1Sample data — click any cell to edit, the formula re-evaluates live
Result
—
✓ readyHyperFormula 3.5
// 04 — Error library

The real-world error library

8 failure patterns mined from actual user reports on Reddit, Stack Overflow and Super User — each with the authentic symptom, root cause, a fix, and a runnable formula. Not textbook theory.

// 05 — Cross-platform

Where RIGHT works

RIGHT is available across modern Excel, Google Sheets and LibreOffice. It has been in Excel since 2003.

PlatformSupportNotesGotcha
✓ Supported full RIGHT◐ Partial works with caveatsCompiled from public docs · verify against your build
// Go deeper

Master text extraction

RIGHT is one piece. The full course walks the toolkit end to end with live, measured examples.

  • LEFT / RIGHT / MID — choosing the extraction direction
  • Dropping the first n characters with LEN
  • The default-1 and over-length rules
  • TEXT + RIGHT for numbers and dates
Free while in beta
Browse the function library

No account needed. Every page has a live playground.

// 07 — FAQ

Frequently asked