Skip to main content
Some blogs like to show an estimated reading time for each post. Marble provides these estimates inside the editor interface, but you can also display them on the frontend of your site.

How It Works

The math behind reading time is fairly simple: it’s based on an average reading speed of 238 words per minute (often rounded to 200 for simplicity).

Implementation

This is a simple function you can use to calculate reading time for any given content:
To then use this function, simply pass in the HTML content of your post, and it will return the estimated reading time in minutes.
You can then use that number to display the reading time on your post pages. Feel free to tweak the words-per-minute value to better suit your audience!