|ordinal Filter

converts a number to its ordinal form.

Number As Markdown

Argument
None
Requires
{% load humanize %} and "django.contrib.humanize" in INSTALLED_APPS

Documentation

Converts an integer to its ordinal string — the form you would say out loud.

Template

{% load humanize %}
<p>You finished {{ place|ordinal }}</p>

Result

<p>You finished 3rd</p>

It knows the awkward ones: 1st, 2nd, 3rd, but 11th, 12th, and 13th.

More Number Filters

All Number Filters


Did we get something wrong? Is there a use case for the ordinal filter that we should add? Please let us know.

Send Feedback

Official Documentation
This page last updated on August 20, 2026