divided_by
Divide a number by another number, calculating integer division or decimal division depending on inputs.
Syntax
{{ number | divided_by: divisor }}Example
{% assign total = 200 %}{{ total | divided_by: 4 }}Output
50The divided_by filter performs arithmetic division on the input number using the provided divisor argument. When dividing by an integer, it returns an integer quotient; using a decimal divisor produces floating point precision.
In programmatic SEO directories, divided_by calculates per-unit costs, monthly payment breakdowns, or average hourly estimates from total package fees. For example: ${{ row.package_cost | divided_by: 12 }}/month. Providing digestible cost breakdowns increases customer engagement and conversion on service pages.
Filters
- abs
- append
- at_least
- at_most
- capitalize
- ceil
- compact
- concat
- date
- default
- divided_by
- downcase
- escape
- escape_once
- first
- floor
- join
- last
- lstrip
- map
- minus
- modulo
- newline_to_br
- plus
- prepend
- remove
- remove_first
- replace
- replace_first
- reverse
- round
- rstrip
- size
- slice
- sort
- sort_natural
- split
- strip
- strip_html
- strip_newlines
- times
- truncate
- truncatewords
- uniq
- upcase
- url_decode
- url_encode
- where
- raw
- slugify
- number_format
