You can use widthratio builtin filter for multiplication and division. To compute A*B: {% widthratio A 1 B %} To compute A/B: {% widthratio A B 1 %}