How to Display a Dynamic Remaining Reading Time in Webflow
Learn how to display a reading time indicator that updates as you scroll in Webflow with JavaScript.
In this tutorial, Sandro, cofounder of Gemeos Webflow agency, shows you how to display a dynamic remaining reading time that updates as you scroll in Webflow.
Example
Scroll the page — the counter appears in the bottom-right corner
| Variable | Value | Description |
|---|---|---|
| WPM | 200 | Words per minute (average reading speed) |
| words | Counted automatically | Number of words in .article-content |
| totalMin | Calculated | Total reading time in minutes |
| remaining | Updated on scroll | Minutes left based on progress |
1. Add the elements in Webflow
Create a Text Block with the ID reading-time-left wherever you want to display the remaining time (article header, sticky sidebar...). Add the article-content class to your content area.
2. Add the script in Footer code
(function() {
var content = document.querySelector('.article-content');
var display = document.getElementById('reading-time-left');
if (!content || !display) return;
var words = content.innerText.trim().split(/\s+/).length;
var WPM = 200;
var totalMin = Math.ceil(words / WPM);
function update() {
var scrolled = window.scrollY;
var docH = document.documentElement.scrollHeight - window.innerHeight;
var pct = Math.min(1, scrolled / docH);
var wordsRead = Math.floor(words * pct);
var remaining = Math.ceil((words - wordsRead) / WPM);
if (remaining <= 0) {
display.textContent = 'Article finished ✓';
} else if (remaining === totalMin) {
display.textContent = totalMin + ' min read';
} else {
display.textContent = remaining + ' min remaining' + (remaining > 1 ? 's' : '');
}
}
update();
window.addEventListener('scroll', update, { passive: true });
})();3. Variant: combined progress bar
Combine it with the reading progress bar for a complete visual and text indicator.
Conclusion
Remaining reading time helps reduce drop-off by giving readers a clear goal. Use cases:
- Long blog posts (5 min+)
- Technical guides and tutorials
- Documentation pages
Lorem ipsum
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.






.avif)







