{
  "schemaVersion": 1,
  "slug": "tiktok-engagement-calculator",
  "category": "social-media",
  "kind": "implementation",
  "independentValidation": false,
  "implementationHash": "65ef3ab097f6220d95b8082f3a421d1c8ca2693649bca9eb9211832670016510",
  "provenance": "Generated from the calculation contract used by the published page. Publication is not external validation.",
  "sourceFiles": [
    "data/calculators/tiktok-engagement-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": "ER = (L + C + S + F) ÷ V × 100",
    "vars": [
      [
        "V",
        "Views"
      ],
      [
        "L",
        "Likes"
      ],
      [
        "C",
        "Comments"
      ],
      [
        "S",
        "Shares"
      ],
      [
        "F",
        "Saves"
      ],
      [
        "ER",
        "Engagement rate (%)"
      ]
    ],
    "note": "Engagement rate = (likes + comments + shares + saves) ÷ views × 100. Each individual rate uses its event count ÷ views × 100; average views per video = views ÷ number of videos. No watch-time, follower-growth or reach prediction is calculated. Rates are undefined when total views are zero."
  },
  "externalEvidence": {
    "reviewedAt": "2026-10-12",
    "sources": [
      {
        "name": "TikTok — Post analytics and observed metrics",
        "url": "https://support.tiktok.com/en/using-tiktok/creating-videos/tiktok-studio"
      }
    ],
    "referenceRole": "input",
    "implementationHash": "65ef3ab097f6220d95b8082f3a421d1c8ca2693649bca9eb9211832670016510",
    "basis": "ER = (L + C + S + F) ÷ V × 100",
    "limitations": "Use the cited guidance and your own measurements, bills or product specifications to choose inputs. Sample defaults are not current local data."
  },
  "contract": {
    "compute": "const ratesDefined=views>0; return { engagementRate: ratesDefined ? (likes+comments+shares+saves)/views*100 : null, likeRate: ratesDefined ? likes/views*100 : null, shareRate: ratesDefined ? shares/views*100 : null, saveRate: ratesDefined ? saves/views*100 : null, commentRate: ratesDefined ? comments/views*100 : null, viewsPerVideo: views/videos };",
    "inputs": [
      {
        "name": "videos",
        "type": "number",
        "default": 10,
        "min": 1,
        "max": 10000,
        "step": 1
      },
      {
        "name": "views",
        "type": "number",
        "default": 500000,
        "min": 0,
        "max": 10000000000,
        "step": 1
      },
      {
        "name": "likes",
        "type": "number",
        "default": 42000,
        "min": 0,
        "max": 10000000000,
        "step": 1
      },
      {
        "name": "comments",
        "type": "number",
        "default": 1800,
        "min": 0,
        "max": 10000000000,
        "step": 1
      },
      {
        "name": "shares",
        "type": "number",
        "default": 3200,
        "min": 0,
        "max": 10000000000,
        "step": 1
      },
      {
        "name": "saves",
        "type": "number",
        "default": 2600,
        "min": 0,
        "max": 10000000000,
        "step": 1
      }
    ],
    "outputs": [
      {
        "name": "engagementRate",
        "precision": 2,
        "unit": "%",
        "optional": true
      },
      {
        "name": "likeRate",
        "precision": 2,
        "unit": "%",
        "optional": true
      },
      {
        "name": "shareRate",
        "precision": 2,
        "unit": "%",
        "optional": true
      },
      {
        "name": "saveRate",
        "precision": 2,
        "unit": "%",
        "optional": true
      },
      {
        "name": "commentRate",
        "precision": 3,
        "unit": "%",
        "optional": true
      },
      {
        "name": "viewsPerVideo",
        "precision": 0,
        "unit": ""
      }
    ],
    "interpret": null
  }
}
