# Calculator tool Node

### Overview

The Calculator Tool Node provides mathematical calculation capabilities to your flow, particularly useful in agent-based tasks. It enables real-time evaluation of mathematical expressions through a standardized tool interface that can be used by agent nodes.

Usage cost: 0 credit

### Configuration

This node has no configurable settings as it provides a standard calculator tool interface.

#### Output Ports

* `calculator_tool` (Tool): A tool object that can:
  * Evaluate mathematical expressions
  * Handle basic and complex calculations
  * Provide formatted results
  * Process numeric operations safely

### Best Practices

1. **Expression Formatting**
   * Use clear mathematical syntax
   * Ensure proper operator spacing
   * Group complex expressions with parentheses
   * Validate input expressions
2. **Error Handling**
   * Plan for division by zero
   * Handle invalid expressions gracefully
   * Validate numeric inputs
   * Check for calculation overflow

### Common Issues

* Syntax errors in expressions
* Floating-point precision errors
* Invalid mathematical operations
* Expression parsing failures
* Invalid function calls


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.waterflai.ai/studio/studio-builders/flow-components-nodes/calculator-tool-node.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
