cr_calculate
Calculate a monster's Challenge Rating from HP, AC, damage per round, and attack bonus or save DC. Accounts for immunities, resistances, and vulnerabilities to return final CR.
Instructions
Calculate the Challenge Rating (CR) for a custom monster given its defensive and offensive stats. Uses the DMG Appendix B algorithm: defensive CR is derived from HP (adjusted for damage immunity, resistance, or vulnerability) and AC; offensive CR is derived from DPR and attack bonus (or save DC). The two are averaged to produce the final CR. Provide at least one of attackBonus or saveDc for the offensive calculation.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ac | Yes | Monster's Armor Class. | |
| hp | Yes | Monster's hit point total. | |
| dpr | Yes | Average damage per round (DPR). For multi-attack creatures, sum all attacks' average damage. | |
| saveDc | No | Monster's spell/ability save DC. Used when attackBonus is not provided. | |
| immunity | No | Monster is immune to a common damage type — effective HP is doubled for CR purposes. | |
| resistance | No | Monster is resistant to a common damage type — effective HP is treated as 1.5× actual. | |
| attackBonus | No | Monster's attack bonus (e.g. +5 → 5). Takes precedence over saveDc. | |
| vulnerability | No | Monster is vulnerable to a common damage type — effective HP is halved for CR purposes. |