# Percentage Math (Float)

> Add or subtract a percentage to/from a floating point number.

- ID: `percentage_math_float`
- Type: Block
- Category: [Math](https://inventor.bot/docs/reference/blocks/math.md)

- Value block: it can be used directly inside expressions, e.g. `"Result: " + percentage_math_float(Args{...})`.

**Inputs**

| Name | Required | Description | Value |
| --- | --- | --- | --- |
| `value` | yes | Base float value. | e.g. `"199.99"` |
| `percentage` | yes | Percentage to apply (e.g. 15.5 for 15.5%). | e.g. `"15.5"` |
| `operation` | yes | Add or subtract the percentage. | `"Add Percentage"`, `"Subtract Percentage"` |

**Outputs**

| Name | Description | Value |
| --- | --- | --- |
| `result` | Resulting value after applying the percentage. | e.g. `"169.99"` |

**Example**

```go
percentageMathFloat := percentage_math_float(Args{
	value:      199.99,
	percentage: 15.5,
	operation:  "Subtract Percentage",
})
send_text_message(Args{
	channel_id:      trigger.channel_id,
	message_content: "Result: " + percentageMathFloat,
})
```