---
title: "Use the RIGHT Function to Extract Characters from the End of Text"
slug: "right-function"
description: "Learn to apply the RIGHT function to extract a specific number of characters from the end of a text value in Pigment."
updated: 2025-05-30T09:42:14Z
published: 2025-08-22T10:57:28Z
---

> ## Documentation Index
> Fetch the complete documentation index at: https://kb.pigment.com/llms.txt
> Use this file to discover all available pages before exploring further.

# RIGHT function

## ​​​​Description

Extracts a given number of characters from a Text, starting from the last character to the first.

## Syntax

`RIGHT(Text to Extract, Number of Characters)`

## Arguments

| Argument | Type | Dimensions | Description |
| --- | --- | --- | --- |
| *Text to Extract* (required) | Text | Any Dimensions | Text to extract characters from. |
| *Number of Characters* (required) | Integer | No Dimension or Dimensions of *Text to Extract* | Number of characters to extract from the end of the text. |

## Returns

| Type | Dimensions |
| --- | --- |
| Text | Dimensions of *Text to Extract* |

Extracted characters from *Text to Extract*.

`BLANK` if *Number of Characters*is a negative integer.

## Examples

| Formula | Result | Description |
| --- | --- | --- |
| `RIGHT(“abc”, 5)` | “abc” | All characters are extracted from “abc”. |
| `RIGHT(“abcd”, 2)` | “cd” | Only the last two characters are extracted from “abcd”. |
| `RIGHT(“a”, -1)` | `BLANK` | The *Number of Characters*, -1, is invalid. |

## See also

Excel: [RIGHT](https://support.microsoft.com/en-us/office/right-rightb-functions-240267ee-9afa-4639-a02b-f19e1786cf2f)

Related articles: [LEFT](/v1/docs/left-function), [MID](/v1/docs/mid-function)

> [!TIP]
> More of a hands-on learner?
> 
> Talk to your Customer Success Manager about downloading the Functions and Modifiers in Pigment Application into your workspace. It includes examples of every formula and modifier in Pigment!

<style> p[data-block-id] {font-size:1rem;} ul li p[data-block-id] {margin-bottom: 0;} ul[data-type="taskList"] li div p[data-block-id] {margin-bottom: 0;} ol li p[data-block-id] {margin-bottom: 0;} table tbody th p[data-block-id] { margin-bottom: 0;} blockquote p[data-block-id] {margin-bottom: 0 !important;} &nbsp;p[data-block-id]:empty::after {content: "\00A0";} </style>
