{
  "id": "osrs-combat",
  "version": "d57cd9fceb9a",
  "status": "published",
  "name": "OSRS Combat Calculator",
  "question": "What is my combat level?",
  "summary": "Works out your Old School RuneScape combat level from Attack, Strength, Defence, Hitpoints, Prayer, Ranged and Magic, and the levels you need for the next one.",
  "category": "game",
  "subcategory": "video-games",
  "url": "https://www.acalculator.org/game/osrs-combat-calculator",
  "markdown": "https://www.acalculator.org/game/osrs-combat-calculator.md",
  "kind": "function",
  "method": "base = ¼ × (Defence + Hitpoints + ⌊Prayer ÷ 2⌋); melee = 13/40 × (Attack + Strength); ranged = 13/40 × ⌊3 × Ranged ÷ 2⌋; magic = 13/40 × ⌊3 × Magic ÷ 2⌋; combat level = ⌊base + max(melee, ranged, magic)⌋.",
  "assumptions": [
    "Levels are the base levels from 1 to 99 (Hitpoints from 10), not boosted levels.",
    "The levels to the next combat level raise one skill at a time and keep the others as they are."
  ],
  "inputs": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "properties": {
      "att": {
        "title": "Attack",
        "description": "Your Attack level, from 1 to 99.",
        "type": "integer",
        "minimum": 1,
        "maximum": 99
      },
      "str": {
        "title": "Strength",
        "description": "Your Strength level, from 1 to 99.",
        "type": "integer",
        "minimum": 1,
        "maximum": 99
      },
      "def": {
        "title": "Defence",
        "description": "Your Defence level, from 1 to 99.",
        "type": "integer",
        "minimum": 1,
        "maximum": 99
      },
      "hp": {
        "title": "Hitpoints",
        "description": "Your Hitpoints level, from 10 to 99.",
        "type": "integer",
        "minimum": 10,
        "maximum": 99
      },
      "pray": {
        "title": "Prayer",
        "description": "Your Prayer level, from 1 to 99.",
        "type": "integer",
        "minimum": 1,
        "maximum": 99
      },
      "rng": {
        "title": "Ranged",
        "description": "Your Ranged level, from 1 to 99.",
        "type": "integer",
        "minimum": 1,
        "maximum": 99
      },
      "mag": {
        "title": "Magic",
        "description": "Your Magic level, from 1 to 99.",
        "type": "integer",
        "minimum": 1,
        "maximum": 99
      }
    }
  },
  "outputs": {
    "combat": {
      "label": "Combat level",
      "description": "The whole combat level, from 3 to 126.",
      "format": "integer"
    },
    "exact": {
      "label": "Combat level with decimals",
      "description": "Base plus the largest of melee, ranged and magic, before rounding down.",
      "format": "number"
    },
    "type": {
      "label": "Combat type",
      "description": "Which of melee, ranged and magic counts: the largest.",
      "format": "text"
    },
    "base": {
      "label": "Base",
      "description": "¼ × (Defence + Hitpoints + ⌊Prayer ÷ 2⌋).",
      "format": "number"
    },
    "melee": {
      "label": "Melee part",
      "description": "13/40 × (Attack + Strength).",
      "format": "number"
    },
    "ranged": {
      "label": "Ranged part",
      "description": "13/40 × ⌊3 × Ranged ÷ 2⌋.",
      "format": "number"
    },
    "magic": {
      "label": "Magic part",
      "description": "13/40 × ⌊3 × Magic ÷ 2⌋.",
      "format": "number"
    },
    "nextAtt": {
      "label": "Attack or Strength levels to the next combat level",
      "description": "The fewest more Attack or Strength levels that raise the combat level by 1, with every other skill as it is; empty when 99 is not enough.",
      "format": "integer"
    },
    "nextDef": {
      "label": "Defence or Hitpoints levels to the next combat level",
      "description": "The fewest more Defence or Hitpoints levels that raise the combat level by 1, with every other skill as it is; empty when 99 is not enough.",
      "format": "integer"
    },
    "nextPray": {
      "label": "Prayer levels to the next combat level",
      "description": "The fewest more Prayer levels that raise the combat level by 1, with every other skill as it is; empty when 99 is not enough.",
      "format": "integer"
    },
    "nextRng": {
      "label": "Ranged levels to the next combat level",
      "description": "The fewest more Ranged levels that raise the combat level by 1, with every other skill as it is; empty when 99 is not enough.",
      "format": "integer"
    },
    "nextMag": {
      "label": "Magic levels to the next combat level",
      "description": "The fewest more Magic levels that raise the combat level by 1, with every other skill as it is; empty when 99 is not enough.",
      "format": "integer"
    }
  },
  "defaultAnswer": {
    "inputs": {
      "att": 60,
      "str": 60,
      "def": 50,
      "hp": 55,
      "pray": 43,
      "rng": 50,
      "mag": 55
    },
    "outputs": {
      "combat": 70,
      "exact": 70.5,
      "type": "Melee",
      "base": 31.5,
      "melee": 39,
      "ranged": 24.375,
      "magic": 26.65,
      "nextAtt": 2,
      "nextDef": 2,
      "nextPray": 3,
      "nextRng": 32,
      "nextMag": 27
    },
    "text": "Your combat level is 70 (Melee)."
  },
  "examples": [
    {
      "given": {
        "att": 1,
        "str": 1,
        "def": 1,
        "hp": 10,
        "pray": 1,
        "rng": 1,
        "mag": 1
      },
      "expect": {
        "combat": 3,
        "exact": 3.4,
        "type": "Melee",
        "base": 2.75,
        "melee": 0.65
      },
      "source": "Old School RuneScape Wiki, Combat level (formula; level 3 for a new account, 126 at the most, 109 for a ranged or magic account), https://oldschool.runescape.wiki/w/Combat_level (retrieved 2026-10-05) (a new account is level 3); hand calculation in content.mdx"
    },
    {
      "given": {
        "att": 99,
        "str": 99,
        "def": 99,
        "hp": 99,
        "pray": 99,
        "rng": 99,
        "mag": 99
      },
      "expect": {
        "combat": 126,
        "exact": 126.1,
        "type": "Melee",
        "base": 61.75,
        "melee": 64.35
      },
      "source": "Old School RuneScape Wiki, Combat level (formula; level 3 for a new account, 126 at the most, 109 for a ranged or magic account), https://oldschool.runescape.wiki/w/Combat_level (retrieved 2026-10-05) (the highest level is 126); hand calculation in content.mdx"
    },
    {
      "given": {
        "att": 1,
        "str": 1,
        "def": 99,
        "hp": 99,
        "pray": 99,
        "rng": 99,
        "mag": 1
      },
      "expect": {
        "combat": 109,
        "exact": 109.85,
        "type": "Ranged",
        "ranged": 48.1
      },
      "source": "Old School RuneScape Wiki, Combat level (formula; level 3 for a new account, 126 at the most, 109 for a ranged or magic account), https://oldschool.runescape.wiki/w/Combat_level (retrieved 2026-10-05) (a ranged account stops at 109); hand calculation in content.mdx"
    },
    {
      "given": {
        "att": 60,
        "str": 60,
        "def": 50,
        "hp": 55,
        "pray": 43,
        "rng": 50,
        "mag": 55
      },
      "expect": {
        "combat": 70,
        "exact": 70.5,
        "type": "Melee",
        "nextAtt": 2,
        "nextDef": 2,
        "nextPray": 3
      },
      "source": "hand calculation in content.mdx; Old School RuneScape Wiki, Combat level (formula; level 3 for a new account, 126 at the most, 109 for a ranged or magic account), https://oldschool.runescape.wiki/w/Combat_level (retrieved 2026-10-05)"
    }
  ],
  "sources": [
    "Old School RuneScape Wiki, Combat level: the formula, level 3 for a new account, 126 at most, and 109 for a ranged or magic account. https://oldschool.runescape.wiki/w/Combat_level (retrieved 2026-10-05)"
  ],
  "related": [
    "dnd-hp",
    "point-buy",
    "kd"
  ],
  "changelog": []
}
