Estimation: Displaying Estimated Reading Time and Word Count

Shopify website development Jan 21, 2026
Estimation: Displaying Estimated Reading Time and Word Count

Estimation: For Reading Time:

Liquide Code -

{% assign reading_time = article.content | strip_html | split: ' ' | size | times: 1.0 | divided_by: 200 | ceil %}{{ reading_time }} min read


Here’s breakdown the code

assign reading_time = article.content: This creates a variable named reading_time and assigns the full body text of blog post. 

| strip_html: This filter removes all HTML tags (like <p>, <strong> or <div> etc) so that we get only the actual words that are counted.

| split: ' ': This turns the long string of text into a list (array) by breaking it apart every time there is a space. Note that, if you use ‘’ (no space) it will return character count.

| size: This counts the total number of items in that list, which effectively gives you the total word count of the article.

| times: 1.0: This converts the whole number into a decimal (float). This is necessary to ensure the division in the next step is precise and doesn't just round down immediately.

| divided_by: 200: This divides the total word count by 200 (we assume the average words read per minute, actually 200 words per minute is an industry standard).

| ceil: It rounds the result up to the nearest integer (e.g., 2.1 minutes becomes a "3 min read").

{{ reading_time }} min read: This outputs the final calculated number onto the page followed by the text "min read."



For Word Count: 

{% assign word_count = article.content | strip_html | split: ' ' | size %}{{ word_count }} words


Since the word count logic follows the same steps explained above, we won’t repeat the breakdown here.

The Estimation of reading time and word counts using Liquid code is a highly efficient, native solution to boost blog user engagement without relying on heavy third-party apps.

Let's Explore Your Project Details

1. End-to-End Store Setup & Configuration
Launch with confidence using our comprehensive setup services. We handle everything from initial domain configuration and payment gateway integration to product catalog organization, ensuring a foundation built for immediate sales.

2. Pixel-Perfect Design & Theme Customization
Stand out with a high-converting storefront tailored to your brand. Whether we’re building a custom theme from scratch or converting Figma/XD designs, we ensure a seamless blend of stunning aesthetics and mobile-first functionality.

3. Custom Functionality & App Development
Go beyond the basics with bespoke solutions. We develop secure private and public Shopify apps that extend your store’s capabilities, automate complex business workflows, and integrate seamlessly with your existing tech stack.

4. Performance & SEO Optimization
Speed is the backbone of conversion. Our developers implement clean Liquid code, optimize Core Web Vitals, and apply technical SEO best practices to ensure your store ranks higher and loads instantly on every device.

5. Seamless Migration & Scaling Support
Upgrade your eCommerce experience without the risk. We provide hassle-free migration from platforms like WooCommerce or Magento, ensuring zero data loss and providing ongoing maintenance to scale your store as your business grows.

Let's Explore Your Project Details

Name

Email

Phone Number

Write a message

Hire Us to Autopilot Your Shopify Service
Back to blog

Recent Viewed Blogs

Continue Reading

  • How to Increase Sales on Shopify Top 15 Strategies

    Shopify Strategies Jan 21, 2026
  • Unlocking Success with Shopify Development Services: Top Trends

    Shopify Development Jan 21, 2026