{% set last_page_index = (paginator.total_pages - 1)/paginator.paginate_by | int + 1 %} {# it's last_index -1 actually #}