← All tool references

Finance · not_available

Tip Calculator

Calculate a restaurant tip, total bill, and per-person split from a bill amount and tip percentage.

Open public tool

Overview

Category
Finance
API mode
not_available
Processing
client-side
Privacy
no-data-stored

Public descriptor

The descriptor is available without an API key and supplies this tool’s metadata, schemas, modes, and examples.

GET /api/v1/tools/tip-calculator

View this descriptor as JSON

Execute availability

This tool is documented as a browser capability. Its execute route does not produce a server-side result; when execution is enabled, it responds with browser_interaction_required and points callers to the public tool page.

POST /api/v1/tools/tip-calculator/execute

Authentication is not issued during the preview. A bearer API key is planned for execution after launch.

Input schema

object object; additional properties are not accepted.

bill_amount · number · required
Enter the bill before tip used in the calculation.
tip_percent · number · required
Enter the tip percentage used in the calculation.
people · number · required
Enter the number of people used in the calculation.
{
    "type": "object",
    "properties": {
        "bill_amount": {
            "type": "number",
            "description": "Enter the bill before tip used in the calculation.",
            "minimum": 0
        },
        "tip_percent": {
            "type": "number",
            "description": "Enter the tip percentage used in the calculation."
        },
        "people": {
            "type": "number",
            "description": "Enter the number of people used in the calculation.",
            "minimum": 1,
            "maximum": 100
        }
    },
    "required": [
        "bill_amount",
        "tip_percent",
        "people"
    ],
    "additionalProperties": false
}

Output schema

On a successful execution, schema values appear in data.result.values.

tip_amount · number
Tip amount produced by the calculation.
total_amount · number
Bill with tip produced by the calculation.
tip_per_person · number
Tip per person produced by the calculation.
total_per_person · number
Total per person produced by the calculation.
{
    "type": "object",
    "properties": {
        "tip_amount": {
            "type": "number",
            "description": "Tip amount produced by the calculation."
        },
        "total_amount": {
            "type": "number",
            "description": "Bill with tip produced by the calculation."
        },
        "tip_per_person": {
            "type": "number",
            "description": "Tip per person produced by the calculation."
        },
        "total_per_person": {
            "type": "number",
            "description": "Total per person produced by the calculation."
        }
    },
    "additionalProperties": false
}

Tip Calculator example

The request body follows the published input schema. The response below shows the success-envelope shape returned after execution is available.

curl -X POST "https://utilitypages.org/api/v1/tools/tip-calculator/execute" \
  -H "Content-Type: application/json" \
  -d '{
    "bill_amount": 84.5,
    "tip_percent": 20,
    "people": 2
}'
{
    "ok": true,
    "data": {
        "slug": "tip-calculator",
        "result": {
            "values": {
                "tip_amount": 16.89999999999999857891452847979962825775146484375,
                "total_amount": 101.400000000000005684341886080801486968994140625,
                "tip_per_person": 8.449999999999999289457264239899814128875732421875,
                "total_per_person": 50.7000000000000028421709430404007434844970703125
            },
            "display": {
                "display": "16.9"
            },
            "warnings": [],
            "assumptions": [],
            "steps": []
        }
    },
    "meta": [],
    "request_id": "req_example_123"
}

Errors

api_not_launched · 503
Returned by the current launch gate for every execute request.
invalid_json · 400
Returned when an enabled execute request does not contain valid JSON.
validation_failed · 422
Returned when a request does not satisfy the input schema.
browser_interaction_required · 422
Returned for browser capability tools instead of inventing a server-side result.
tool_not_found · 404
Returned when a requested descriptor slug does not exist.
execution_failed · 503
Returned when an enabled server-side execution cannot complete.