{
  "id": "dnd-encounter",
  "version": "08add6c7e187",
  "status": "published",
  "name": "5e Encounter Calculator",
  "question": "Encounter calculator 5e",
  "summary": "Rates a 5e combat encounter as Low, Moderate or High difficulty: the party’s XP budget from each character’s level against the total XP of the monsters by challenge rating.",
  "category": "game",
  "subcategory": "tabletop",
  "url": "https://www.acalculator.org/game/dnd-encounter-calculator",
  "markdown": "https://www.acalculator.org/game/dnd-encounter-calculator.md",
  "kind": "function",
  "method": "Budget = Σ characters × XP Budget per Character (Low, Moderate, High) for their level; monster XP = Σ monsters × XP for their CR; difficulty = the lowest budget the monster XP does not go over.",
  "assumptions": [
    "The budgets and XP values are those of the 5e System Reference Document 5.2.1 (the 2024 rules), which uses no encounter multiplier for groups of monsters.",
    "For a party of mixed levels, each character adds the budget for their own level (the SRD table is per character).",
    "XP is a guide, not a guarantee: terrain, tactics, rest and luck all change how hard a fight is.",
    "Includes material from the System Reference Document 5.2.1 by Wizards of the Coast LLC, licensed under CC BY 4.0 (see Sources)."
  ],
  "inputs": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "properties": {
      "p": {
        "title": "Party",
        "description": "One row per group of characters at the same level: how many, and their level.",
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "n": {
              "title": "Characters",
              "description": "How many characters are at this level.",
              "type": "integer",
              "minimum": 1,
              "maximum": 12
            },
            "lv": {
              "title": "Level",
              "description": "Their character level, from 1 to 20.",
              "type": "integer",
              "minimum": 1,
              "maximum": 20
            }
          }
        }
      },
      "m": {
        "title": "Monsters",
        "description": "One row per kind of monster: how many, and their challenge rating.",
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "mn": {
              "title": "How many",
              "description": "How many monsters of this kind.",
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            },
            "cr": {
              "title": "Challenge rating",
              "description": "The monster’s challenge rating (CR), with the XP it is worth.",
              "type": "string",
              "enum": [
                "0",
                "0x",
                "1-8",
                "1-4",
                "1-2",
                "1",
                "2",
                "3",
                "4",
                "5",
                "6",
                "7",
                "8",
                "9",
                "10",
                "11",
                "12",
                "13",
                "14",
                "15",
                "16",
                "17",
                "18",
                "19",
                "20",
                "21",
                "22",
                "23",
                "24",
                "25",
                "26",
                "27",
                "28",
                "29",
                "30"
              ]
            }
          }
        }
      }
    }
  },
  "outputs": {
    "difficulty": {
      "label": "Difficulty",
      "description": "Low, Moderate or High: the smallest budget the monsters’ XP fits within; Above High when it is over the High budget.",
      "format": "text"
    },
    "xp": {
      "label": "Monster XP",
      "description": "The XP of every monster added up.",
      "format": "integer"
    },
    "low": {
      "label": "Low budget",
      "description": "The Low XP budget: each character’s Low budget for their level, added up.",
      "format": "integer"
    },
    "moderate": {
      "label": "Moderate budget",
      "description": "The Moderate XP budget, added up over the characters.",
      "format": "integer"
    },
    "high": {
      "label": "High budget",
      "description": "The High XP budget, added up over the characters.",
      "format": "integer"
    },
    "left": {
      "label": "XP left in the budget",
      "description": "The budget of this difficulty minus the monsters’ XP: what you could still add without going over.",
      "format": "integer"
    },
    "characters": {
      "label": "Characters",
      "description": "How many characters are in the party.",
      "format": "integer"
    },
    "creatures": {
      "label": "Creatures",
      "description": "How many monsters are in the encounter.",
      "format": "integer"
    },
    "note": {
      "label": "Note",
      "description": "A warning when there are more than two creatures per character.",
      "format": "text"
    }
  },
  "defaultAnswer": {
    "inputs": {
      "p": [
        {
          "count": 4,
          "level": 3
        }
      ],
      "m": [
        {
          "count": 1,
          "cr": "3"
        },
        {
          "count": 4,
          "cr": "1-4"
        }
      ]
    },
    "outputs": {
      "difficulty": "Moderate",
      "xp": 900,
      "low": 600,
      "moderate": 900,
      "high": 1600,
      "left": 0,
      "characters": 4,
      "creatures": 5
    },
    "text": "Monsters worth 900 XP make a Moderate encounter for 4 characters."
  },
  "examples": [
    {
      "given": {
        "p": [
          {
            "count": 4,
            "level": 1
          }
        ],
        "m": [
          {
            "count": 6,
            "cr": "1-8"
          }
        ]
      },
      "expect": {
        "low": 200,
        "moderate": 300,
        "high": 400,
        "xp": 150,
        "difficulty": "Low",
        "left": 50,
        "creatures": 6
      },
      "source": "System Reference Document 5.2.1 by Wizards of the Coast LLC (CC BY 4.0), Gameplay Toolbox, Combat Encounter Difficulty: XP Budget per Character table and its steps, https://www.dndbeyond.com/srd (Example 1); System Reference Document 5.1 by Wizards of the Coast LLC (CC BY 4.0), Monsters, Experience Points by Challenge Rating, https://www.dndbeyond.com/srd (CR 1/8 = 25 XP)"
    },
    {
      "given": {
        "p": [
          {
            "count": 5,
            "level": 3
          }
        ],
        "m": [
          {
            "count": 2,
            "cr": "2"
          },
          {
            "count": 9,
            "cr": "1-8"
          }
        ]
      },
      "expect": {
        "moderate": 1125,
        "xp": 1125,
        "difficulty": "Moderate",
        "left": 0,
        "low": 750,
        "creatures": 11
      },
      "source": "System Reference Document 5.2.1 by Wizards of the Coast LLC (CC BY 4.0), Gameplay Toolbox, Combat Encounter Difficulty: XP Budget per Character table and its steps, https://www.dndbeyond.com/srd (Example 2); System Reference Document 5.1 by Wizards of the Coast LLC (CC BY 4.0), Monsters, Experience Points by Challenge Rating, https://www.dndbeyond.com/srd (CR 2 = 450 XP)"
    },
    {
      "given": {
        "p": [
          {
            "count": 6,
            "level": 15
          }
        ],
        "m": [
          {
            "count": 2,
            "cr": "17"
          },
          {
            "count": 2,
            "cr": "9"
          }
        ]
      },
      "expect": {
        "high": 46800,
        "xp": 46000,
        "difficulty": "High",
        "left": 800
      },
      "source": "System Reference Document 5.2.1 by Wizards of the Coast LLC (CC BY 4.0), Gameplay Toolbox, Combat Encounter Difficulty: XP Budget per Character table and its steps, https://www.dndbeyond.com/srd (Example 3); System Reference Document 5.1 by Wizards of the Coast LLC (CC BY 4.0), Monsters, Experience Points by Challenge Rating, https://www.dndbeyond.com/srd (CR 17 = 18,000 XP, CR 9 = 5,000 XP)"
    },
    {
      "given": {
        "p": [
          {
            "count": 2,
            "level": 5
          },
          {
            "count": 1,
            "level": 4
          }
        ],
        "m": [
          {
            "count": 1,
            "cr": "8"
          }
        ]
      },
      "expect": {
        "low": 1250,
        "moderate": 1875,
        "high": 2700,
        "xp": 3900,
        "difficulty": "Above High",
        "characters": 3
      },
      "source": "hand calculation in content.mdx: Low 2 × 500 + 250 = 1,250, High 2 × 1,100 + 500 = 2,700, CR 8 = 3,900 XP; System Reference Document 5.2.1 by Wizards of the Coast LLC (CC BY 4.0), Gameplay Toolbox, Combat Encounter Difficulty: XP Budget per Character table and its steps, https://www.dndbeyond.com/srd; System Reference Document 5.1 by Wizards of the Coast LLC (CC BY 4.0), Monsters, Experience Points by Challenge Rating, https://www.dndbeyond.com/srd"
    }
  ],
  "sources": [
    "System Reference Document 5.2.1 by Wizards of the Coast LLC (CC BY 4.0), Gameplay Toolbox, Combat Encounter Difficulty: choose a difficulty, multiply the XP Budget per Character by the number of characters, spend it on creatures by their XP; Examples 1 to 3. https://www.dndbeyond.com/srd (retrieved 2026-10-02; table read in the Markdown copy https://github.com/downfallx/dnd-5e-srd-markdown, gameplay-toolbox.md)",
    "System Reference Document 5.1 by Wizards of the Coast LLC (CC BY 4.0), Monsters, Experience Points by Challenge Rating (the same values as SRD 5.2.1). https://www.dndbeyond.com/srd (retrieved 2026-10-02; read on https://api.open5e.com/v1/sections/monsters/)"
  ],
  "related": [
    "point-buy",
    "odds"
  ],
  "changelog": []
}
