{
  "schema_version": 2,
  "id": "commands/tdigest.quantile",
  "title": "TDIGEST.QUANTILE",
  "url": "https://redis.io/docs/latest/commands/tdigest.quantile/",
  "summary": "Returns, for each input fraction, a floating-point estimation of the value that is smaller than the given fraction of observations",
  "since": "2.4.0",
  "tags": [
    "docs",
    "develop",
    "stack",
    "oss",
    "rs",
    "rc",
    "oss",
    "kubernetes",
    "clients"
  ],
  "last_updated": "2026-09-18T09:48:54+01:00",
  "page_type": "content",
  "content_hash": "08e662e27ffd713fc8312b098ab7b5929121b50e06341065439eaa7750ee2109",
  "sections": [
    {
      "id": "overview",
      "title": "Overview",
      "role": "overview",
      "text": "Returns, for each input fraction, a floating-point estimation of the value that is smaller than the given fraction of observations.\nMultiple quantiles can be retrieved in a single call."
    },
    {
      "id": "required-arguments",
      "title": "Required arguments",
      "role": "content",
      "text": "<details open><summary><code>key</code></summary> \n\nis the key name for an existing t-digest sketch.\n</details>\n\n<details open><summary><code>quantile</code></summary> \n\nis the input fraction between 0 and 1 inclusively.\n</details>"
    },
    {
      "id": "examples",
      "title": "Examples",
      "role": "example",
      "text": "redis> TDIGEST.CREATE t COMPRESSION 1000\nOK\nredis> TDIGEST.ADD t 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5\nOK\nredis> TDIGEST.QUANTILE t 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1\n 1) \"1\"\n 2) \"2\"\n 3) \"3\"\n 4) \"3\"\n 5) \"4\"\n 6) \"4\"\n 7) \"4\"\n 8) \"5\"\n 9) \"5\"\n10) \"5\"\n11) \"5\""
    },
    {
      "id": "redis-software-and-redis-cloud-compatibility",
      "title": "Redis Software and Redis Cloud compatibility",
      "role": "content",
      "text": "| Redis<br />Software | Redis<br />Cloud | <span style=\"min-width: 9em; display: table-cell\">Notes</span> |\n|:----------------------|:-----------------|:------|\n| <span title=\"Supported\">&#x2705; Supported</span><br /> | <span title=\"Supported\">&#x2705; Flexible & Annual</span><br /><span title=\"Supported\">&#x2705; Free & Fixed</nobr></span> |  |"
    },
    {
      "id": "return-information",
      "title": "Return information",
      "role": "returns",
      "text": "**RESP2:**\n\nOne of the following:\n\n* [Array](https://redis.io/docs/latest/develop/reference/protocol-spec#arrays) of [bulk string replies](https://redis.io/docs/latest/develop/reference/protocol-spec#bulk-strings) as floating-point estimates, populated with value_1, value_2, ..., value_N.\n    * an accurate result when `quantile` is `0`, the value of the smallest observation.\n    * an accurate result when `quantile` is `1`, the value of the largest observation.\n    * `nan` for all quantiles when the given sketch is empty.\n* [Simple error reply](https://redis.io/docs/latest/develop/reference/protocol-spec#simple-errors) in these cases: the given key does not exist or is of an incorrect type, quantile parsing errors, or incorrect number of arguments.\n\n**RESP3:**\n\nOne of the following:\n\n* [Array](https://redis.io/docs/latest/develop/reference/protocol-spec#arrays) of [double replies](https://redis.io/docs/latest/develop/reference/protocol-spec#doubles) as estimates, populated with value_1, value_2, ..., value_N.\n    * an accurate result when `quantile` is `0`, the value of the smallest observation.\n    * an accurate result when `quantile` is `1`, the value of the largest observation.\n    * `nan` for all quantiles when the given sketch is empty.\n* [Simple error reply](https://redis.io/docs/latest/develop/reference/protocol-spec#simple-errors) in these cases: the given key does not exist or is of an incorrect type, quantile parsing errors, or incorrect number of arguments."
    }
  ],
  "examples": []
}
