{
  "schema_version": 2,
  "id": "commands/hincrby",
  "title": "HINCRBY",
  "url": "https://redis.io/docs/latest/commands/hincrby/",
  "summary": "Increments the integer value of a field in a hash by a number. Uses 0 as initial value if the field doesn't exist.",
  "since": "2.0.0",
  "tags": [
    "docs",
    "develop",
    "stack",
    "oss",
    "rs",
    "rc",
    "oss",
    "kubernetes",
    "clients"
  ],
  "last_updated": "2026-07-24T11:07:00+02:00",
  "page_type": "content",
  "content_hash": "7d67d2d35072668455ad2b107f9716aaa855df6743731b30429e0a0bd4b2691c",
  "sections": [
    {
      "id": "overview",
      "title": "Overview",
      "role": "overview",
      "text": "Increments the number stored at `field` in the hash stored at `key` by\n`increment`.\nIf `key` does not exist, a new key holding a hash is created.\nIf `field` does not exist the value is set to `0` before the operation is\nperformed.\n\nThe range of values supported by `HINCRBY` is limited to 64 bit signed integers."
    },
    {
      "id": "required-arguments",
      "title": "Required arguments",
      "role": "content",
      "text": "<details open><summary><code>key</code></summary>\n\nThe name of the key that holds the hash.\n\n</details>\n\n<details open><summary><code>field</code></summary>\n\nThe field whose value to increment.\n\n</details>\n\n<details open><summary><code>increment</code></summary>\n\nThe integer amount to add to the field's value.\n\n</details>"
    },
    {
      "id": "examples",
      "title": "Examples",
      "role": "example",
      "text": "Since the `increment` argument is signed, both increment and decrement\noperations can be performed:\n\n\nredis> HSET myhash field 5\n(integer) 1\nredis> HINCRBY myhash field 1\n(integer) 6\nredis> HINCRBY myhash field -1\n(integer) 5\nredis> HINCRBY myhash field -10\n(integer) -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; Standard</span><br /><span title=\"Supported\"><nobr>&#x2705; Active-Active</nobr></span> | <span title=\"Supported\">&#x2705; Standard</span><br /><span title=\"Supported\"><nobr>&#x2705; Active-Active</nobr></span> |  |"
    },
    {
      "id": "return-information",
      "title": "Return information",
      "role": "returns",
      "text": "**RESP2:**\n\n[Integer reply](../../develop/reference/protocol-spec#integers): the value of the field after the increment operation.\n\n**RESP3:**\n\n[Integer reply](../../develop/reference/protocol-spec#integers): the value of the field after the increment operation."
    }
  ],
  "examples": []
}
