{
  "schemaVersion": 1,
  "slug": "reading-speed-calculator",
  "category": "productivity",
  "kind": "implementation",
  "independentValidation": false,
  "implementationHash": "23e722e913085fb87e3be83bfd60fd58f5feb5fa011c7556f77ffad615de236a",
  "provenance": "Generated from the calculation contract used by the published page. Publication is not external validation.",
  "sourceFiles": [
    "data/calculators/reading-speed-calculator.json",
    "src/engine.js"
  ],
  "runtimeSource": "/sources/engine.txt",
  "runtimeHash": "5c888d8898afbdee36267bb9977829e1e2ac568f6677c8ee87469c139864645c",
  "scope": "The compute function records implemented equations, constants, lookup tables and custom rules. Inputs record defaults and allowed values; outputs record precision and units. Defaults are examples, not recommendations. General background references are not evidence for this specific algorithm.",
  "publishedFormula": {
    "formula": "v = W ÷ t; D = (P × w ÷ v) ÷ m",
    "vars": [
      [
        "W",
        "Words read"
      ],
      [
        "t",
        "Minutes spent"
      ],
      [
        "v",
        "Reading speed (wpm)"
      ],
      [
        "P",
        "Book pages"
      ],
      [
        "w",
        "Words per page"
      ],
      [
        "m",
        "Minutes read per day"
      ],
      [
        "D",
        "Days to finish the book"
      ],
      [
        "bks",
        "Books per year"
      ]
    ],
    "note": "Book completion uses the entered words per page and reading minutes per day. Books per year assumes the same daily reading pace on all 365 days. No reading band or comprehension score is produced."
  },
  "externalEvidence": null,
  "contract": {
    "compute": "if(wordsRead<=0||minutes<=0||readingMinutesPerDay<=0)return{wpm:null,bookWords:null,bookHours:null,daysToFinish:null,booksPerYear:null,__error:'inputError'}; const wpm=wordsRead/minutes; const bookWords=bookPages*wordsPerPage; const bookHours=bookWords/wpm/60; const daysToFinish=bookWords/wpm/readingMinutesPerDay; return{wpm,bookWords,bookHours,daysToFinish,booksPerYear:daysToFinish>0?365/daysToFinish:0};",
    "inputs": [
      {
        "name": "wordsRead",
        "type": "number",
        "default": 900,
        "min": 1,
        "max": 100000,
        "step": 1
      },
      {
        "name": "minutes",
        "type": "number",
        "default": 4,
        "min": 0.1,
        "max": 1000,
        "step": 0.1
      },
      {
        "name": "bookPages",
        "type": "number",
        "default": 320,
        "min": 1,
        "max": 5000,
        "step": 1,
        "slider": true
      },
      {
        "name": "wordsPerPage",
        "type": "number",
        "default": 250,
        "min": 50,
        "max": 1000,
        "step": 10,
        "slider": true
      },
      {
        "name": "readingMinutesPerDay",
        "type": "number",
        "default": 30,
        "min": 1,
        "max": 600,
        "step": 5,
        "slider": true
      }
    ],
    "outputs": [
      {
        "name": "wpm",
        "precision": 0,
        "unit": "wpm"
      },
      {
        "name": "bookWords",
        "precision": 0,
        "unit": "words"
      },
      {
        "name": "bookHours",
        "precision": 1,
        "unit": "h"
      },
      {
        "name": "daysToFinish",
        "precision": 1,
        "unit": "days"
      },
      {
        "name": "booksPerYear",
        "precision": 1,
        "unit": ""
      }
    ],
    "interpret": null
  }
}
