{
  "schemaVersion": 1,
  "slug": "twitter-engagement-calculator",
  "category": "social-media",
  "kind": "implementation",
  "independentValidation": false,
  "implementationHash": "d999e29e3805c662058069d35a30816b98fb526b1ede2371c0ebd0d997bbfdb8",
  "provenance": "Generated from the calculation contract used by the published page. Publication is not external validation.",
  "sourceFiles": [
    "data/calculators/twitter-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=E/I×100; ERf=E/P/F×100; CTR=C/I×100; RP=R/I×100; RR=r/E×100; X=I/P/F",
    "vars": [
      [
        "I",
        "Impressions"
      ],
      [
        "E",
        "Engagements"
      ],
      [
        "P",
        "Posts"
      ],
      [
        "F",
        "Followers"
      ],
      [
        "ER",
        "Engagement rate (%)"
      ],
      [
        "CTR",
        "Click-through rate (%)"
      ]
    ],
    "note": "Rates with a zero denominator are undefined; no zero rate is fabricated. These ratios do not predict platform distribution or ranking."
  },
  "externalEvidence": {
    "reviewedAt": "2026-10-12",
    "sources": [
      {
        "name": "X — Post analytics metric definitions",
        "url": "https://business.x.com/en/help/campaign-measurement-and-analytics/tweet-activity-dashboard"
      }
    ],
    "referenceRole": "input",
    "implementationHash": "d999e29e3805c662058069d35a30816b98fb526b1ede2371c0ebd0d997bbfdb8",
    "basis": "ER=E/I×100; ERf=E/P/F×100; CTR=C/I×100; RP=R/I×100; RR=r/E×100; X=I/P/F",
    "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 er=impressions>0?engagements/impressions*100:null;const ctr=impressions>0?linkClicks/impressions*100:null;return {engagementRate:er,engagementRateFollowers:followers>0?(engagements/posts)/followers*100:null,clickThroughRate:ctr,repostRate:impressions>0?reposts/impressions*100:null,replyRatio:engagements>0?replies/engagements*100:null,impressionsPerPost:impressions/posts,reachMultiplier:followers>0?(impressions/posts)/followers:null};",
    "inputs": [
      {
        "name": "posts",
        "type": "number",
        "default": 20,
        "min": 1,
        "max": 10000,
        "step": 1
      },
      {
        "name": "impressions",
        "type": "number",
        "default": 200000,
        "min": 0,
        "max": 10000000000,
        "step": 1
      },
      {
        "name": "engagements",
        "type": "number",
        "default": 6000,
        "min": 0,
        "max": 10000000000,
        "step": 1
      },
      {
        "name": "reposts",
        "type": "number",
        "default": 700,
        "min": 0,
        "max": 10000000000,
        "step": 1
      },
      {
        "name": "replies",
        "type": "number",
        "default": 900,
        "min": 0,
        "max": 10000000000,
        "step": 1
      },
      {
        "name": "linkClicks",
        "type": "number",
        "default": 1200,
        "min": 0,
        "max": 10000000000,
        "step": 1
      },
      {
        "name": "followers",
        "type": "number",
        "default": 15000,
        "min": 1,
        "max": 1000000000,
        "step": 1
      }
    ],
    "outputs": [
      {
        "name": "engagementRate",
        "precision": 3,
        "unit": "%",
        "optional": true
      },
      {
        "name": "engagementRateFollowers",
        "precision": 3,
        "unit": "%"
      },
      {
        "name": "clickThroughRate",
        "precision": 3,
        "unit": "%",
        "optional": true
      },
      {
        "name": "repostRate",
        "precision": 3,
        "unit": "%",
        "optional": true
      },
      {
        "name": "replyRatio",
        "precision": 1,
        "unit": "%",
        "optional": true
      },
      {
        "name": "impressionsPerPost",
        "precision": 0,
        "unit": ""
      },
      {
        "name": "reachMultiplier",
        "precision": 2,
        "unit": "x"
      }
    ],
    "interpret": null
  }
}
