seconds = num_words / 265 * 60 + image_weight * num_images
It's based on an average reading speed of 265 words per minute (for English), and also takes into consideration images. If the post has only 1 image it adds 12 seconds, and for posts with many images it adds 3 seconds per image. From the Quora article:
image_weightstarting at 12 seconds and decreasing one second with each image until 3 seconds.
For my Linux router post it estimated 6 minutes, which sounds about right to me.
The feature was inspired by James Gallagher's blog[archived] which I discovered recently, but of couse I've seen it before on Medium and other blogs. His article Rethinking the Blog[archived] says it's approximately 7 minutes long, while the Medium algorithm would clock it at 5 minutes (1284 words).