Skip to content

Docs

How Ashare works, including the exact formulas.

Split a bill

  1. What is it for: a name for the bill, e.g. “Lab GPU server — November”. It heads the summary and names the CSV file.
  2. Bill total: the amount in dollars, more than $0.
  3. Usage measured in: the unit everyone's usage is counted in — hours, GPU-hours, GB, seats, kWh.
  4. Part split equally first: 0 % splits purely by usage, 100 % splits the bill evenly, anything between does both.
  5. People and usage: at least two people, up to 50, each with a different name and a usage of 0 or more. Use “+ Add a person” and the × button to change the list.
  6. Who paid the bill (optional): Ashare then lists what everyone else owes that person.
  7. Copy summary puts a plain-text breakdown on your clipboard; Download CSV saves a spreadsheet with one row per person and a total row.

The math

  1. Everything is worked out in whole cents. T = bill total in cents, p = equal part in percent.
  2. Equal pool E = round(T × p / 100); usage pool U = T − E.
  3. Each of n people gets E / n from the equal pool and U × (their usage / everyone's usage) from the usage pool. If nobody has any usage, the usage pool is also split evenly.
  4. Rounding: each person first gets the whole cents below their exact share; the cents left over go one at a time to the largest fractions (ties go to the person higher on the list). The shares therefore always add up to T.
  5. CSV cells are quoted, and text that starts with =, +, −, @ or a tab gets a leading apostrophe so a spreadsheet does not run it as a formula.

Account and workspace

  1. Choose Sign up, then enter your name, email and a password with at least 8 characters, one letter and one number.
  2. You land in your workspace at /app. The splitter there keeps your last bill in this browser (localStorage); clearing site data removes it.
  3. Use Log out in the top bar when you are done on a shared device. To delete your account, email [email protected].

Account API

  1. POST /api/auth/signup with JSON { name, email, password } → 201 and a session cookie; 409 if the email is taken, 400 on invalid input.
  2. POST /api/auth/login with JSON { email, password } → 200 and a session cookie; 401 on a wrong password, 429 after too many tries.
  3. GET /api/auth/me → 200 with the signed-in user, or 401 when signed out. POST /api/auth/logout ends the session.
  4. Requests that change data must come from the same origin (cookie session, no API keys). The splitter itself has no API — it runs in your browser.

Ashare is a calculator. It does not move, hold or collect money, and the shares are only as accurate as the usage you enter.