# Source: https://upstash.com/docs/redis/sdks/ts/commands/string/incrbyfloat.md

# Source: https://upstash.com/docs/redis/sdks/py/commands/string/incrbyfloat.md

> ## Documentation Index
> Fetch the complete documentation index at: https://upstash.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# INCRBYFLOAT

> Increment the float value of a key by a given number.

If a key does not exist, it is initialized as 0 before performing the operation. An error is returned if the key contains a value of the wrong type or contains a string that can not be represented as integer.

## Arguments

<ParamField body="key" type="str" required>
  The key to decrement.
</ParamField>

<ParamField body="increment" type="float" required>
  The amount to increment by.
</ParamField>

## Response

<ResponseField type="float" required>
  The value at the key after the incrementing.
</ResponseField>

<RequestExample>
  ```py Example theme={"system"}
  redis.set("key", 6)

  # returns 10.5
  redis.incrbyfloat("key", 4,5)
  ```
</RequestExample>