Finance Utilities

Calculate Tip

Calculates tip amounts and splits bills among multiple people with precise decimal handling. Use via MCP in AI coding assistants or REST API at /v1/finance/tip. Example: $120 bill, 18% tip, 4 people = $30 each plus $5.40 tip per person. Returns exact amounts without floating-point errors that plague simple percentage calculations.

API Endpoint

GET /v1/finance/tip

Code Examples

curl "https://tinyfn.io/v1/finance/tip" \
  -H "X-API-Key: YOUR_API_KEY"
const response = await fetch('https://tinyfn.io/v1/finance/tip', {
  headers: { 'X-API-Key': 'YOUR_API_KEY' }
});
const data = await response.json();
console.log(data);
import requests

response = requests.get('https://tinyfn.io/v1/finance/tip',
    headers={'X-API-Key': 'YOUR_API_KEY'})
data = response.json()
print(data)

Use via MCP

Add to your AI agent

Connect your AI agent (Claude, Cursor, Windsurf, etc.) to TinyFn's finance tools:

{
  "mcpServers": {
    "tinyfn-finance": {
      "url": "https://tinyfn.io/mcp/finance",
      "headers": {
        "X-API-Key": "YOUR_API_KEY"
      }
    }
  }
}

Learn more about MCP setup →

FAQ

How do I calculate tip and split a restaurant bill among multiple people?

Pass the bill amount, tip percentage, and number of people. The tool returns per-person totals, tip amounts, and grand total with proper rounding.

Does the tip calculator handle edge cases like zero tip or single person?

Yes, it handles 0% tips, single-person bills, and fractional percentages. All calculations use precise decimal arithmetic to avoid rounding errors.

Can I use this in MCP-enabled AI tools for expense tracking workflows?

Absolutely. In Cursor or Claude Code, AI agents can calculate tips during expense report generation or budget planning without manual math.

What's the difference between this and doing percentage math manually?

This tool eliminates floating-point precision errors common in percentage calculations and provides structured output for programmatic use.

How does the bill splitting work with odd amounts?

The tool distributes fractional cents appropriately so the sum always equals the exact total, following standard rounding conventions.

Try Calculate Tip Now

Get your free API key and start using Calculate Tip in seconds.

Get Free API Key