Docs
How Ashare works, including the exact formulas.
Split a bill
- What is it for: a name for the bill, e.g. “Lab GPU server — November”. It heads the summary and names the CSV file.
- Bill total: the amount in dollars, more than $0.
- Usage measured in: the unit everyone's usage is counted in — hours, GPU-hours, GB, seats, kWh.
- Part split equally first: 0 % splits purely by usage, 100 % splits the bill evenly, anything between does both.
- 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.
- Who paid the bill (optional): Ashare then lists what everyone else owes that person.
- 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
- Everything is worked out in whole cents. T = bill total in cents, p = equal part in percent.
- Equal pool E = round(T × p / 100); usage pool U = T − E.
- 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.
- 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.
- 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
- Choose Sign up, then enter your name, email and a password with at least 8 characters, one letter and one number.
- You land in your workspace at /app. The splitter there keeps your last bill in this browser (localStorage); clearing site data removes it.
- Use Log out in the top bar when you are done on a shared device. To delete your account, email [email protected].
Account API
- POST /api/auth/signup with JSON { name, email, password } → 201 and a session cookie; 409 if the email is taken, 400 on invalid input.
- POST /api/auth/login with JSON { email, password } → 200 and a session cookie; 401 on a wrong password, 429 after too many tries.
- GET /api/auth/me → 200 with the signed-in user, or 401 when signed out. POST /api/auth/logout ends the session.
- 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.