---
title: '|get_digit'
description: returns the digit `i` characters from the right side of the value.
date: '2026-08-02'
categories:
  - Filter
  - Number
canonical: https://coolify.djangotemplatetagsandfilters.com/filters/get_digit/
doc_link: https://docs.djangoproject.com/en/6.0/ref/templates/builtins/#get-digit
---

# |get_digit

returns the digit `i` characters from the right side of the value.

## Documentation

Returns the digit `i` characters from the right side of a value, which must be an integer.

### Variable

```django
num = 6789
```

### Template

```django
{{ num|get_digit:1 }}, {{ num|get_digit:2 }},
{{ num|get_digit:3 }}, {{ num|get_digit:4 }}
```

### Result

```django
9, 8, 7, 6
```

## Commentary

It is hard to think of a use case for this one.
