---
title: "Calculate probability of meeting a target with a dice expression. Supports keep-high/low (4d6kh3)."
method: POST
path: "/api/tools/dice_odds"
---

# Calculate probability of meeting a target with a dice expression. Supports keep-high/low (4d6kh3).

`POST /api/tools/dice_odds`

## Request

- Base URL: `https://tools.moddable.games`
- URL: `https://tools.moddable.games/api/tools/dice_odds`
- Auth: none declared

## Request body

- object
  - `expression` string, required: Dice expression (e.g. 2d6, 4d6kh3)
  - `target` number, required: Target number to meet or exceed
  - `comparison` '>=' | '>' | '<=' | '<' | '=': Comparison (default >=)

## Response `200`

Tool result

---

[API](https://skmtc.dev/moddable/apis/moddable-games-tools.md) · [All operations](https://skmtc.dev/moddable/apis/moddable-games-tools/llms.txt) · [OpenAPI document](https://skmtc.dev/moddable/apis/moddable-games-tools/revisions/637a0b62cb9a?raw)
