Skip to content

[Request] Add ability to specify default split method to apply to new group expenses #373

Description

@cnexus

Is your feature request related to a problem? Maybe it would be better as discussion? Please describe.

For groups:

  • Add a feature like splitwise where you are able to specify the DEFAULT split method for all future transactions added to that group.

Describe the solution you'd like
Pre-req: User A has already configured the default split method to use for Group X, for example split by shares between User A (2 shares) and User B (1 share).

Expected flow:

  • After configuring default, User A adds a new $60 expense to Group X.
  • Since a Default Split exists for Group X, the new $60 expense applies this Default Split.
  • Expense split is updated at 2 shares for User A ($40) and 1 share for User B ($20)

Describe alternatives you've considered
No clear alternatives are available. At the moment the best option is to manually apply a specific Split Method to every new transaction.

App version
Unclear how to find the exact version so this is what I found:
version 1
org.chromium.webapk.a35af08a715a4e5df v2

Additional context
Splitwise currently has this feature where you can specify a default split method for all new expenses in a Group.

Activity

  1. added theissue type on Sep 17, 2025
  2. krokosik commented on Sep 17, 2025

    @krokosik
    Collaborator

    Can you record a video of how it works in Splitwise?

  3. cnexus commented on Sep 18, 2025

    @cnexus
    Author

    Ah unfortunately it is a Pro feature in splitwise, however I do know that Default Split is defined in the settings/options for a Group. Can't find many details on implementation other than that.

    I would also have been more than happy to help with development but i am more of a Java/Python guy with very limited web experience.

  4. gabrielbergeron commented on Dec 15, 2025

    @gabrielbergeron

    I would like to add my vote for this feature too! This would be super helpful to split my expenses with my partner.

    I tried the Pro trial to see how they handled it. It's very similar to the page used to change a single transaction split, except you only have access to set Equal, Percent or Share split types.
    When the members of the group change, they simply clear the saved default split and go back to an equal split.

    Image
    Image
    Image

  5. krokosik commented on Feb 3, 2026

    @krokosik
    Collaborator

    Alright, so I imagine we could do the following:

    • add a tab to SplitTypeSection which lists our saved splits and allows: adding, deleting and picking the default
    • adding the split would open a SplitTypeSection with just equal, percentages and shares
    • upon saving it is now listed in the aforemetnioned tab and the first split is selected as default
    • when creating new expenses, the default split is applied

    To consider:

    • what happens to saved splits when group members are added/removed? Should we just clear the splits?
    • QoL, should the new tab be first or last to not break existing user flows? I would imagine putting it last, when there are no saved splits and first if they are in use
  6. swever826 commented on Feb 3, 2026

    @swever826

    Sounds good! But what if this feature is implemented as a "last split type selected becomes the default one"?

    A group would use the split type selected on the most recent expense as the default split type.

    SplitPro would just need to remember the last split type used as the default one.

    For example, if a user creates a group and adds an expense with the percentage split type, the next time the user wants to create a new expense in that group, the percentage split type will appear as selected with the users and the percentages that were selected last time.

    That way we don't need the user to do extra work to configure a default split type.

    Also, there would be a default split type for each group and for non-group expenses I don't know if it's better to have a default split type per user or just have the default type to always be the equal type?

    If users in a group are added or removed, the remembered split type could be discarded so the default split type for the next new expense would go back to the equal type.

    So when a user wants to add a new expense, the process could be something like this:

    Scenario #1:

    • If expense is in group -> auto-select last split type used in that group -> no split type found? -> select the equal type

    Scenario #2:

    • If expense is not in group -> auto-select last split type used for the users selected -> no split type found? -> select the equal type

    What do you think? I hope I was able to explain correctly the idea.

  7. gabrielbergeron commented on Feb 3, 2026

    @gabrielbergeron

    Wouldn’t it be less intrusive and more intuitive to have the default split in the group settings page? That way, if you wanted to have one transaction with a different split type, it wouldn’t mess up all the future ones that will be added.

    The way I see it is:

    • When creating an expense, if the group has a default split, apply it by default to the expense. If you change the split type, only this expense is affected.
    • If the group has no default split type, Equal Split is applied.

    When the group members change, the default split type is reset to Equal Split.

  8. swever826 commented on Feb 3, 2026

    @swever826

    Yeah that's true its an intrusive option, but it's the same as how the currency selection works and using another expense than the default one is very rare and on the next expense the user can turn back the default split type as how it was before.

    Also, it could remember the default split type only when all the users in the group are selected in the expense, so when adding an expense for only one of the users, it doesn't affect the default split type.

    Although with this it seems more complicated than just having the option in the group's configuration haha.

    Another Idea:

    Another option could be a toggle when selecting a split type that indicates that you want to set that selection as the default type. It would look better than a new tab or option in the info page of a group. And it could work for non-group expenses too if it is able to be implemented for specific users when adding an expense for a user outside a group.

    With this the user doesn't need to search for that option in the group's configuration.

    The conditions of that toggle could be:

    • The toggle will be off if no default split type has been set and it will auto-select the equal type.
    • After saving the expense with that toggle on, a default split type is set for that group.
    • When the user wants to add a new expense, the default split type will be automatically selected.
    • Opening the split type page will show the default split type and modifying any value would turn the toggle off automatically so it doesn't affect the current default split type. The user can turn the toggle back on to change the default split type to the new value.

    Here's an example image on how it might look like:
    1770159608669.png

    What do you think?

  9. mfontanaar commented on Feb 6, 2026

    @mfontanaar

    Alright, so I imagine we could do the following:

    * add a tab to `SplitTypeSection` which lists our saved splits and allows: adding, deleting and **picking the default**
    
    * adding the split would open a `SplitTypeSection` with just equal, percentages and shares
    
    * upon saving it is now listed in the aforemetnioned tab and the first split is selected as default
    
    * when creating new expenses, the default split is applied
    

    To consider:

    * what happens to saved splits when group members are added/removed? Should we just clear the splits?
    
    * QoL, should the new tab be first or last to not break existing user flows? I would imagine putting it last, when there are no saved splits and first if they are in use
    

    I like this approach of having more then one saved split. Not my use case, but can see people splitting differently across same group (say food 50/50, leisure 60/40).

    Would be great if this could be handled via some sort of group settings option, without having to navigate to adding a expense.

    I could try to post a PR if you think it would help.

    Regarding corner cases, gracefully failing might be a good start.

  10. ConfidentKeyboard commented on Apr 2, 2026

    @ConfidentKeyboard

    Yes Please! I would 100% use this instead of Splitwise, if this feature existed.

  11. matt-rgx commented on Apr 7, 2026

    @matt-rgx

    Hello guys, this feature is the only one missing for me to leave cospend and nextcloud for split-pro, really looking forward to it :)

  12. matt-rgx commented on Apr 9, 2026

    @matt-rgx

    While waiting for this feature to be implemented, I set up a PostgreSQL workaround for my self-hosted instance.

    Context: two-person household with a fixed 55/45 split on all shared expenses.

    Approach: added a defaultWeight column to GroupUser and a deferred constraint trigger on ExpenseParticipant that recalculates amounts at transaction commit time based on those weights. The trigger skips SETTLEMENT, CURRENCY_CONVERSION and ADJUSTMENT split types so reimbursements pass through unchanged.

    ALTER TABLE "GroupUser" ADD COLUMN "defaultWeight" integer;
    
    
    
    CREATE OR REPLACE FUNCTION reweight_expense_participants()
    
    RETURNS TRIGGER AS $$
    
    DECLARE
    
      v_total bigint; v_group_id integer; v_paid_by integer;
    
      v_split_type "SplitType"; v_total_weight integer;
    
      v_part_count integer; v_weighted_count integer;
    
      rec RECORD; v_share bigint; v_others_total bigint := 0;
    
    BEGIN
    
      IF current_setting('splitpro.reweighting', true) = 'true' THEN RETURN NEW; END IF;
    
      SELECT e.amount, e."groupId", e."paidBy", e."splitType"
    
      INTO v_total, v_group_id, v_paid_by, v_split_type
    
      FROM "Expense" e WHERE e.id = NEW."expenseId" AND e."deletedAt" IS NULL;
    
      IF NOT FOUND OR v_group_id IS NULL THEN RETURN NEW; END IF;
    
      IF v_split_type IN ('SETTLEMENT', 'CURRENCY_CONVERSION', 'ADJUSTMENT') THEN RETURN NEW; END IF;
    
      SELECT COUNT(ep."userId"), COUNT(gu."defaultWeight")
    
      INTO v_part_count, v_weighted_count
    
      FROM "ExpenseParticipant" ep
    
      LEFT JOIN "GroupUser" gu ON gu."userId" = ep."userId"
    
        AND gu."groupId" = v_group_id AND gu."defaultWeight" IS NOT NULL
    
      WHERE ep."expenseId" = NEW."expenseId";
    
      IF v_part_count <> v_weighted_count OR v_part_count < 2 THEN RETURN NEW; END IF;
    
      SELECT SUM(gu."defaultWeight") INTO v_total_weight
    
      FROM "ExpenseParticipant" ep
    
      JOIN "GroupUser" gu ON gu."userId" = ep."userId" AND gu."groupId" = v_group_id
    
      WHERE ep."expenseId" = NEW."expenseId";
    
      IF v_total_weight IS NULL OR v_total_weight = 0 THEN RETURN NEW; END IF;
    
      PERFORM set_config('splitpro.reweighting', 'true', true);
    
      FOR rec IN
    
        SELECT ep."userId", gu."defaultWeight"
    
        FROM "ExpenseParticipant" ep
    
        JOIN "GroupUser" gu ON gu."userId" = ep."userId" AND gu."groupId" = v_group_id
    
        WHERE ep."expenseId" = NEW."expenseId" AND ep."userId" <> v_paid_by
    
        ORDER BY ep."userId"
    
      LOOP
    
        v_share := FLOOR(v_total::numeric * rec."defaultWeight" / v_total_weight);
    
        UPDATE "ExpenseParticipant" SET amount = -v_share
    
          WHERE "expenseId" = NEW."expenseId" AND "userId" = rec."userId";
    
        v_others_total := v_others_total + v_share;
    
      END LOOP;
    
      UPDATE "ExpenseParticipant" SET amount = v_others_total
    
        WHERE "expenseId" = NEW."expenseId" AND "userId" = v_paid_by;
    
      RETURN NEW;
    
    END;
    
    $$ LANGUAGE plpgsql;
    
    
    
    CREATE CONSTRAINT TRIGGER reweight_on_expense_insert
    
    AFTER INSERT ON "ExpenseParticipant"
    
    DEFERRABLE INITIALLY DEFERRED
    
    FOR EACH ROW EXECUTE FUNCTION reweight_expense_participants();
    

    Works well for a personal setup. Native support in the UI would still be much appreciated — this doesn't survive a Prisma migration that recreates GroupUser.

  13. krokosik commented on Apr 9, 2026

    @krokosik
    Collaborator

    I might be wrong, but this might cause all future prisma migrations to fail due to mismatch with the template database structure. Also, does editing expenses still work? What about edge cases like leftover penny distribution?

    It's nice to be proactive, but I would advise others to consider if they want to go with this solution.

    I see that this feature is in high demand, so I'll make it a higher priority.

  14. added this to the 2.1 milestone on Apr 9, 2026
  15. matt-rgx commented on Apr 9, 2026

    @matt-rgx

    I might be wrong, but this might cause all future prisma migrations to fail due to mismatch with the template database structure. Also, does editing expenses still work? What about edge cases like leftover penny distribution?

    It's nice to be proactive, but I would advise others to consider if they want to go with this solution.

    I see that this feature is in high demand, so I'll make it a higher priority.

    Thanks for the heads up on the Prisma migration risk — that's a fair concern, and I should have flagged it more explicitly. The trigger does run outside Prisma's awareness, so yes, it could potentially conflict with future schema migrations depending on how the template database is handled.

    To answer your questions: editing expenses does still work in my setup — the trigger only fires on INSERT, not UPDATE.
    As for penny distribution, the fixed weights (55/45 in my case) can leave a remainder; I'm currently handling that by always assigning the leftover to one specific user, but it's admittedly a rough workaround rather than a proper solution.

    That said, this is very much a personal hack to unblock my migration from Cospend — I wouldn't recommend it as a general approach. Really glad to hear the feature is moving up the priority list, looking forward to a proper implementation !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions