Splitto

March 18, 2023

Splitto screenshot

Splitto (who needs a cool name when you are the only user of your app?) is an app to split group expenses evenly.

Yes, i know that there are a lot of them already, but all the ones i tried have the same problem. You are either required to be registered on their service, or you need to create “groups” to split the bill. Useful when you are on a trip, a vacation, or living with someone, but not when you only need a one-off for a dinner or a few drinks.

It uses this greedy algorithm, which doesnt provide the optimal solution, as in the least amount of transactions, but its good enough.

  1. Sum everyone spendings
  2. Divide the total by the amount of people
  3. Calculate each persons net as: SPENT - PER_PERSON
  4. Sort all the positives from highest to lowest, and all the negatives from lowest to highest.
  5. Net out first positive with first negative, and pull out the one that gets to zero. Sort again
  6. Repeat untill no more items.

You can use it from here, (yes, technically its not an app, its a PWA, but who is counting).

And as always, you could read the source code on github but dont expect nothing too fancy, plain old HTML, CSS and Javascript. Not even a build tool. I didnt even minify it, because its already lightweight.

Leave your comment on the github issue, sending me an email or DMing me on twitter