ForHosting KIT · Home, food & hobbies

Shared expense splitter

Receipts of 45.5, 30 and 24.5 shared by three people, one of them counted double, come to 25, 25 and 50. List every expense and give each person a weight to see what everyone owes. Free in your browser.

  • Free
  • Runs in your browser
  • No sign-up
  • Your data stays on your device
Use it from WebAPIEmailTelegramApp soon

Runs in your browser. Free, unlimited — your data never leaves this page.

Shared dinners, group rentals, flatmate utilities, and weekend trips all end the same way: someone has a list of receipts and a group chat full of people who did not consume the same amount. A shared expense splitter takes every itemized amount, multiplies the grand total by each person's weight over the sum of weights, and returns a clear owes figure for every participant. Equal roommates use weight one for everyone; couples hosting with friends can give a couple weight two and singles weight one; parents splitting a bill with kids can zero out a child's weight so only adults pay.

How weighted shared expense splitting works

Begin with the list of money already spent on behalf of the group. Each entry is a single line item amount in one agreed currency, such as groceries, a restaurant tab, a rideshare, or a utility bill. You may pass plain numbers or small objects that carry an amount plus an optional description; only the amounts enter the math.

Sum those amounts to obtain the expense total that must be recovered. Next list one share weight per person. A weight is a non-negative finite number that encodes relative responsibility, not a currency unit.

Equal split among three people is weights one, one, and one. A couple plus a guest who should pay half as much might use two, two, and one. Someone who is not paying this round can keep weight zero while others hold positive weights.

The calculator forms weight sum as the sum of every weight. When the sum is positive, person i owes expense total multiplied by weight i divided by the weight sum. Share ratios are reported alongside the currency amounts so you can audit the proportion independently of the currency scale.

Negative expense amounts and negative weights are rejected because this model describes money spent and non-negative relative shares, not refunds or inverted responsibilities. Empty expense lists and empty weight lists fail early. Currency symbols are omitted so the same engine works for USD, EUR, or any unit the group already chose offline.

Flatmate monthly settlement

Itemize rent, utilities, and groceries, assign weights for nights present, and post each person's owes amount without a shared spreadsheet.

Uneven restaurant or bar tab

Split a multi-course bill by weight so heavy drinkers or couples pay a fair share while the group sees clear ratios.

Trip and event expense bots

Feed receipt totals and participant weights into a backend bot so payment requests match the same math as the free browser tool.

How is each person's share calculated?

Sum all itemized expense amounts to get the total. Each person owes total × (their weight ÷ sum of all weights). Equal weights mean an equal split.

What happens if all weights are zero?

A zero weight sum would divide by zero, so the calculator refuses to invent shares.

Can some people have weight zero?

Yes, as long as at least one weight is positive. Zero-weight people owe zero for this settlement while others cover the total.

How do I format expenses and weights?

Send expenses as an array of numbers (e.g. [45.5, 30, 24.5]) or objects with amount, and weights as a matching-style numeric array (e.g. [1, 1, 2]). Optional names label each person.

What does it cost?

The browser tool is free and runs locally.

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/life/expense-split

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/life/expense-split \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"expenses":[45.5,30,24.5],"weights":[1,1,2]}'
{
  "expenses": [
    45.5,
    30,
    24.5
  ],
  "weights": [
    1,
    1,
    2
  ]
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "life.expense_split",
  "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.

When every weight is zero the request fails with a validation error because division by a zero weight sum is undefined.

How weighted shared expense splitting works

When that sum is exactly zero, or numerically indistinguishable from zero, the request fails with invalid input: each person's share is total times weight divided by the weight sum, and that quotient is undefined when nobody has a positive share. Everything is deterministic floating-point arithmetic with no network calls, no random seeds, and no wall-clock timestamps, so identical inputs always produce identical JSON.

What you send and what you get back

Send two required fields and one optional field. The optional field names is an array of display strings with the same length as weights; when omitted, people are labeled Person 1, Person 2, and so on. Classic checks include one hundred total with weights one and one for fifty each, or ninety with weights one, one, and two so the third person pays forty-five. Wire the free browser form for flatmate chats and dinner tables, then call the identical contract from scripts when a bot or backend needs the same numbers. The field expenses is a non-empty array of finite non-negative amounts, or objects with a finite non-negative amount field, or a JSON string of that array. The field weights is a non-empty array of finite non-negative numbers, one entry per person, or a JSON string of that array. Missing required fields, non-numeric strings, NaN, Infinity, empty arrays, negative amounts, negative weights, a names length that does not match weights, and a weight sum of zero all fail with invalid_input and are not charged. On success the response returns expense_count, the cleaned expenses list with index, amount, and optional description, expense_total, person_count, the cleaned weights and weight_sum, the resolved names, a people array of objects each with name, weight, share_ratio, and owes, plus a parallel owes array for easy scripting. The method string weighted_expense_split and the formula string restating owes equals total times weight over sum of weights document the contract. Pricing for successful API calls is the published base of $0.002 per item; validation failures do not consume prepaid balance.

Where shared expense splitters show up in real work

Flatmates settling monthly rent, utilities, and groceries need a single trusted answer for how much each person owes after every receipt is itemized, especially when one roommate was away half the month and should carry a lower weight. Friend groups splitting a long restaurant bill with unequal shares for wine or kids meals use weights instead of hand calculators so nobody re-derives the arithmetic in the chat. Couples hosting guests can assign double weight to a shared seat and single weight to each guest, then post the people array directly into a payment request. The SEO slug targets people searching for a shared expense splitter with itemized costs and custom weights, which is a different intent from equal road-trip fuel-and-tolls calculators, tip splitters, or LLM tools that only categorize transactions. Expense automation pipelines store expense_total, weight_sum, share ratios, and per-person owes for audit after each shared event. Because this capability is a pure parse engine, API pricing is the published base of $0.002 per successful item and failed validation does not consume balance. Keep the landing focused on weighted recovery of an itemized total so the page ranks for that phrase and the JSON contract stays small enough for widgets and SMS bots.

Read the full KIT documentation →