# Tip Calculator API

> Tip Calculator computes tips and splits bill totals across group members. Pass a pre-tip bill amount, tip percentage, and group size to get the tip total, overall cost, and individual per-person shares.

**Endpoint:** `GET https://api.apiverve.com/v1/tipcalculator`  
**Category:** Math/Calculations  
**Cost:** 1 credit per call  
**Canonical page:** https://apiverve.com/marketplace/tipcalculator

## Overview

Tip Calculator takes a pre-tip bill, a tip percentage and the number of people at the table, and returns the tip, the total and each person's share of the bill, the tip and the total. Works as a tip calculator and bill splitter in one call, with common tip percentages included for comparison. It handles a 0% tip correctly and defaults to 15% and one person when those values are left out.

Restaurant and dining apps use it at checkout, expense and group-payment tools use it to split bill totals fairly, and point-of-sale screens use it to suggest a gratuity before the customer chooses one.

The Free plan returns the bill, tip percentage, tip amount, total, currency code and the per-person breakdown. Paid plans add a comparison table at 10, 15, 18, 20 and 25 percent with the tip, total and per-person figure for each, and display-ready strings with the currency symbol already attached, so a gratuity calculator screen can render without its own formatting code.

## Authentication

Every call carries your key in an `x-api-key` header. The same key works across the whole
APIVerve catalog — there are no per-API subscriptions. Responses always use the same three
top-level keys: `status`, `error`, and `data`.

## Example request

```bash
curl "https://api.apiverve.com/v1/tipcalculator?amount=100&percentage=18&people=4&currency=USD" \
  -H "x-api-key: YOUR_API_KEY"
```

## Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `amount` | number | Yes | The bill amount before tip (max 1,000,000,000,000). range 0-1000000000000 |
| `percentage` | number | No | Tip percentage. default 15. range 0-100 |
| `people` | integer | No | Number of people to split the bill. default 1. range 1-inf |
| `currency` | string | No | Currency code for display. default USD |

## Response fields

- `bill_amount` — number · Original bill amount before tip calculation
- `tip_percentage` — number · Tip percentage applied to the bill
- `tip_amount` — number · Calculated tip amount in currency
- `total_amount` — number · Total amount including bill and tip
- `currency` — string · Currency code used for amounts
- `split_between` — number · Number of people bill is split among
- `per_person` — object
  - `per_person.bill_amount` — number · Individual bill amount per person
  - `per_person.tip_amount` — number · Individual tip amount per person
  - `per_person.total_amount` — number · Individual total amount per person
  - `common_tip_amounts.0.percentage` — number · Tip percentage for comparison option · (premium)
  - `common_tip_amounts.0.tip_amount` — number · Tip amount for comparison option · (premium)
  - `common_tip_amounts.0.total` — number · Total amount for comparison option · (premium)
  - `common_tip_amounts.0.per_person` — number · Per-person total for comparison option · (premium)
- `formatted` — object · Human-readable formatted currency values · (premium)
  - `formatted.bill_amount` — string · Formatted bill amount with currency symbol · (premium)
  - `formatted.tip_amount` — string · Formatted tip amount with currency symbol · (premium)
  - `formatted.total_amount` — string · Formatted total amount with currency symbol · (premium)
  - `formatted.per_person_total` — string · Formatted per-person total with currency symbol · (premium)

## Sample response

```json
{
  "status": "ok",
  "error": null,
  "data": {
    "bill_amount": 100,
    "tip_percentage": 18,
    "tip_amount": 18,
    "total_amount": 118,
    "currency": "USD",
    "split_between": 4,
    "per_person": {
      "bill_amount": 25,
      "tip_amount": 4.5,
      "total_amount": 29.5
    },
    "common_tip_amounts": [
      {
        "percentage": 10,
        "tip_amount": 10,
        "total": 110,
        "per_person": 27.5
      },
      {
        "percentage": 15,
        "tip_amount": 15,
        "total": 115,
        "per_person": 28.75
      },
      {
        "percentage": 20,
        "tip_amount": 20,
        "total": 120,
        "per_person": 30
      }
    ],
    "formatted": {
      "bill_amount": "$100.00",
      "tip_amount": "$18.00",
      "total_amount": "$118.00",
      "per_person_total": "$29.50"
    }
  }
}
```

## Use cases

- **Dining Apps** — Integrate tip calculation features into restaurant and food delivery applications
- **Expense Tracking** — Calculate and track tip expenses for budgeting and expense reporting
- **Bill Splitting** — Split restaurant bills fairly among groups with automatic tip calculation
- **Financial Tools** — Provide tip guidance and calculation in personal finance and budgeting apps

## SDKs

- **npm** — `npm install @apiverve/tipcalculator` (https://www.npmjs.com/package/@apiverve/tipcalculator)
- **NuGet** — `dotnet add package APIVerve.API.TipCalculator` (https://www.nuget.org/packages/APIVerve.API.TipCalculator)
- **Source** — https://github.com/apiverve/tipcalculator-api

## More

- Full reference: https://docs.apiverve.com/ref/tipcalculator
- Get an API key: https://dashboard.apiverve.com
- Full catalog: https://apiverve.com/marketplace
