ForHosting KIT · Developer Utilities

Split a shared expense by unequal shares

Equal splitting is simple, but it is not always fair. Roommates may use rooms of different sizes, travelers may stay for different numbers of nights, and household members may agree to contribute according to income.

● BetaFree · in your browser
Use it from WebAPIEmailTelegramApp soon

This calculator divides one shared expense using a weight for each person. Enter the total, names, and relative weights, then receive each owed amount with consistent rounding. The weights can represent any agreed measure, and the final allocations always add back to the rounded total.

Choose weights that express the agreement

A weight is a relative share, not necessarily a percentage or a currency amount. If three people use weights 1, 2, and 3, they owe one sixth, two sixths, and three sixths of the total. Multiplying every weight by the same number does not change the result, so weights 10, 20, and 30 describe exactly the same arrangement. This makes the calculator flexible enough for rent based on room size, utilities based on occupancy, a group booking based on nights stayed, or household costs based on income. Agree on what the weights mean before calculating, and use the same basis for everyone in the group. A person may have a zero weight when they are intentionally exempt from this particular expense. However, the weights as a whole must contain at least one positive value. If every weight is zero, there is no mathematical basis for distributing the total, so the calculator returns an input error instead of inventing an equal split. Names must also be unique, keeping the result clear when it is copied into a message or ledger.

Understand rounding and exact totals

Proportional division often produces fractions smaller than the currency unit you can actually pay. For example, dividing a small bill among three weighted shares may produce repeating decimals. This calculator first converts the entered total to the selected decimal precision, computes every exact proportional share, and assigns the remaining smallest units using the largest-remainder method. People whose unrounded amounts have the largest fractional remainders receive those units first. If two remainders are equal, their original input order breaks the tie, which keeps repeated runs deterministic. The important practical result is that the displayed owed amounts always add up to the displayed total; no cent disappears and no cent is created. Use two decimals for currencies such as dollars or euros, zero for whole-unit accounting, or a higher precision when the shared quantity supports it. The returned `share` value describes each person’s mathematical proportion, while `owed` is the payable amount after rounding. Because the total itself is rounded to the requested precision, enter it with the precision your settlement process recognizes.

Review and communicate the result

Treat the calculation as a transparent implementation of the group’s agreement, not as the agreement itself. Before collecting money, review the total, the weight sum, and every person’s weight. A typo such as 20 instead of 2 is mathematically valid but can radically change the allocation. The response includes the normalized share and owed amount beside each name, making it straightforward to explain how the result was reached. Save the original inputs with the output when the split matters for bookkeeping, since the weights provide useful context that owed amounts alone cannot show. For recurring expenses, keep the weighting rule stable and update it openly when circumstances change. The browser version is convenient for an occasional rent, dinner, trip, or utility calculation, while the API can apply the same deterministic rule inside a property-management workflow, travel organizer, spreadsheet integration, or internal finance tool for $0.002 per request. No exchange-rate lookup or payment transfer occurs: all amounts are assumed to use one unit, and the calculator only returns the allocation.

Divide rent by room size

Use relative floor area or an agreed room score to allocate one rent total among housemates.

Share a trip by nights stayed

Weight travelers by the nights each person participated so shorter stays owe less.

Allocate household costs by income

Use agreed income-based weights to distribute a common bill while keeping the math transparent.

Do weights have to add up to 100?

No. Weights are relative and may add up to any positive number.

What happens if all weights are zero?

The request returns an invalid input error because a proportional split cannot be calculated from a zero weight sum.

Can one person have a zero weight?

Yes. That person will owe zero as long as at least one other person has a positive weight.

Will the owed amounts add up exactly?

Yes. The largest-remainder method distributes rounding units so the allocations sum to the total at the chosen precision.

What does the API cost?

Each API request costs $0.002. The on-page browser calculator can run locally for free.

Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.

POSThttps://api.kit.forhosting.com/calc3/split-expenses-unequal-shares

Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, by email and from Telegram — and soon from our app too.

curl -X POST https://api.kit.forhosting.com/calc3/split-expenses-unequal-shares \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"total":120,"people":[{"name":"Alex","weight":1},{"name":"Blair","weight":2},{"name":"Casey","weight":3}]}'
{
  "total": 120,
  "people": [
    {
      "name": "Alex",
      "weight": 1
    },
    {
      "name": "Blair",
      "weight": 2
    },
    {
      "name": "Casey",
      "weight": 3
    }
  ]
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "calc3.split_expenses_unequal_shares",
  "status": "queued",
  "_links": {
    "result": "/tasks/tsk_…/result"
  }
}

The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.

Per request$0.002

Published price — no tokens, no invented credits. A failed task is never charged.

HTTPCodeMeaning
401unauthorizedMissing or invalid API key.
402insufficient_balanceYour balance doesn't cover the task price.
404unknown_typeThat task type doesn't exist.
429rate_limitedToo many requests. Use the webhook instead of polling.

Read the full KIT documentation →