---
title: "Operator Reference"
canonical: "https://www.questportal.com/documentation/-GoGw5XsTn/operator-reference"
section: "Documentation / Dice / Roll Formulas"
source: "Quest Portal documentation"
version: 237
---

# Operator Reference

### Die Modifiers (No spaces around operators)

- \`d\`, \`D\` - Die operator
- \`k\` - Keep highest
- \`kl\` - Keep lowest
- \`d\` - Drop lowest
- \`dh\` - Drop highest
- \`!\` - Explode
- \`!!\` - Compound explode
- \`!p\` - Penetrating explode
- \`r\` - Reroll
- \`ro\` - Reroll once
- \`>\`, \`\<\`, \`=\` - Success target
- \`f\` - Failure target
- \`cs\` - Critical success
- \`cf\` - Critical failure
- \`s\`/\`sa\` - Sort ascending
- \`sd\` - Sort descending
- \`m\` - Match count
- \`mt\` - Match total

### Math Operators (Recommended with spaces)

- \`+\` - Addition
- \`-\` - Subtraction
- \`\*\` - Multiplication
- \`/\` - Division
- \`\*\*\` - Exponentiation
- \`%\` - Modulo/remainder

### Comparison Operators (Recommended with spaces)

- \`>\` - Greater than
- \`\<\` - Less than
- \`=\` - Equal to
- \`>=\` - Greater than or equal to
- \`\<=\` - Less than or equal to

### Grouping

- \`( )\` - Grouping expressions
- \`{ }\` - Grouped rolls
- \`\[ \]\` - Labels

### Functions

- \`floor()\` - Round down
- \`ceil()\` - Round up
- \`round()\` - Round to nearest integer
- \`abs()\` - Absolute value
- \`min()\` - Minimum of two numbers
- \`max()\` - Maximum of two numbers
- \`if()\` - Conditional

---

Part of the [Quest Portal documentation](https://www.questportal.com/documentation.md) (Documentation / Dice / Roll Formulas). HTML version: <https://www.questportal.com/documentation/-GoGw5XsTn/operator-reference>.
