An expense tracking and splitting app for macOS, inspired by Splitwise, vibe-coded UI with core logic designed, tested and impelemented by me. Built with SwiftUI.
- Equal Split - Divide expenses equally among participants
- Custom Percentages - Specify exact percentages (e.g., 50/30/20)
- Custom Amounts - Enter actual rupee amounts per person
- Multi-payer Support - Multiple people can pay for one expense
- Add unlimited people to your roster
- Edit names anytime
- Delete protection for people in active groups
- Quick-add people while creating groups
- Full undo support (Cmd+Z)
- Pie Charts - Spending by category or person
- Timeline Bar Chart - Expense history over time
- Toggle Display - Switch between percentages and actual amounts
- Real-time Updates - Charts update as you add expenses
- Create multiple groups for different trips/projects
- Select which members participate in each expense
- Two debt settlement views:
- Simplified - Minimal transactions (greedy algorithm)
- Detailed - All cross-payments shown
- Real-time net balance calculations
- Optional categorization (Food, Travel, Shopping, etc.)
- Quick-pick buttons for frequently used categories
- Set categories via context menu
- Filter expenses by category
- Search by description or category
- Filter by person (payer or participant)
- Sort by date, amount, or description
- Multiple sort options (ascending/descending)
- Group CSV - Export all group expenses
- Person CSV - Export individual expense history
- Auto-opens in Finder after export
- Proper CSV formatting with escaping
- Cmd+Z to undo any action
- Cmd+Shift+Z to redo
- Integrates with macOS Edit menu
- User-friendly action names
- Undo for: add, edit, delete expenses, category changes, toggle settings
- Automatic JSON persistence
- Saves to Application Support directory
- Data survives app restarts
- Backward compatible with old data
Group overview with statistics, interactive charts, and expense list
Pie charts showing spending breakdown by category/person with toggle for percentages/amounts
Three split types: Equal, Custom Percentages, and Custom Amounts
Add, edit, and delete people with usage tracking
- macOS 13.0 or later
- Xcode 15.0 or later
- Swift 5.9 or later
-
Clone the repository
git clone https://github.com/Kiran1510/Expense-Share.git cd Expense-Share -
Open in Xcode
open "Expense Share.xcodeproj" -
Build and Run
- Press
Cmd+Ror click the Run button - The app will launch with demo data
- Press
The app automatically creates demo data on first launch:
- People: Kiran, Arun, Meera
- Group: Demo Group
- Expense: Pizza (โน900)
You can delete these and add your own data via "Manage People" and "New Group".
- Click "Manage People" in the sidebar
- Add people you share expenses with
- Edit names by right-clicking
- Delete unused people (protected if in groups)
- Click "New Group" in sidebar
- Enter group name (e.g., "Goa Trip")
- Select members from your people list
- Or quick-add new people on the fly
- Click "Create group"
- Select a group from the sidebar
- Scroll to "Add a new expense"
- Enter description (e.g., "Dinner")
- Optional: Add category
- Enter amounts each person paid
- Select who participated
- Choose split type:
- Equal - Split evenly
- Custom % - Enter percentages (must total 100%)
- Custom โน - Enter exact amounts
- Click "Add expense"
- Overview section shows who paid what
- Net position shows who owes/receives money
- Toggle "Simplify debts" for minimal payments
- Charts show spending breakdown
- Double-click any expense to edit
- Or right-click โ "Edit"
- Change split type, amounts, participants
- Press Cmd+Z to undo changes
- Click "Export group CSV" for all expenses
- Or "Export member CSV" for individual history
- Files open automatically in Finder
- Location:
~/Documents/ExpenseShareExports/
Expense_Share/
โโโ Expense_ShareApp.swift # App entry point
โโโ Models & Store/
โ โโโ ExpenseStore.swift # Core data models and business logic
โ โโโ ExpenseStore+Undo.swift # Undo/redo support
โโโ Views/
โ โโโ ContentView.swift # Main UI (sidebar + detail)
โ โโโ EditExpenseSheet.swift # Edit expense modal
โ โโโ ExpenseFilters.swift # Search/filter/sort logic
โ โโโ ChartsView.swift # Interactive charts
โ โโโ PeopleManagementView.swift # People CRUD interface
โโโ Components/
โ โโโ CategoryPicker.swift # Reusable category selector
โโโ Utilities/
โโโ CSVExporter.swift # CSV formatting and export
Person
- UUID identifier
- Name
Group
- UUID identifier
- Name
- Member IDs (references to People)
- Simplify debts toggle
- Creation date
Expense
- UUID identifier
- Group ID
- Description
- Optional category
- Payer contributions (multi-payer support)
- Participant IDs
- Split type (equal/custom percentages/custom amounts)
- Custom split values
- Creation date
Cent-Based Arithmetic All calculations use integer cents to avoid floating-point rounding errors:
func toCents(_ amount: Double) -> Int
func fromCents(_ cents: Int) -> DoubleEqual Split with Remainder Distribution Divides total evenly and distributes remainder cents to first N participants:
func sharesForParticipants(totalCents: Int, participantIDs: [UUID]) -> [UUID: Int]Custom Percentage Split Allocates cents proportionally, last person gets remainder to prevent rounding errors:
func sharesForCustomSplit(totalCents: Int, customSplits: [UUID: Double], participantIDs: [UUID]) -> [UUID: Int]Custom Amount Split Direct allocation of specified amounts:
func sharesForCustomAmounts(customSplits: [UUID: Double], participantIDs: [UUID]) -> [UUID: Int]Simplified Debts (Greedy Settlement) Minimizes number of transactions:
- Calculate net balance for each person
- Match largest creditor with largest debtor
- Settle maximum possible amount
- Repeat until all balanced
- MVVM Pattern - ExpenseStore as ViewModel
- SwiftUI - Declarative UI
- Combine - Reactive data binding via
@Published - JSON Persistence - Automatic save/load
- NSUndoManager - Native undo/redo support
- Cmd+Z - Undo last action
- Cmd+Shift+Z - Redo
- Cmd+W - Close window/sheet
- Delete - Delete selected expense (swipe-to-delete)
- Enter - Submit forms
- Double-click - Edit expense
- No Calculator Needed - Custom amounts eliminate mental math
- Visual Feedback - Colors indicate who owes (red) and receives (green)
- Progressive Disclosure - Advanced options appear when needed
- Forgiving UI - Undo support for all major actions
- Cent-based calculations - Zero rounding errors
- Validation - Can't add invalid data
- Delete protection - Can't delete people in active groups
- Automatic persistence - Never lose data
- Efficient algorithms - O(n) for most operations
- Lazy loading - Views update only when needed
- Optimized SwiftUI - Minimal re-renders
Group: "Goa Trip"
Members: Alice, Bob, Charlie
Expense 1: Hotel โน6,000 (Alice paid)
Split: Equal โ Each owes โน2,000
Expense 2: Dinner โน900 (Bob paid)
Split: Alice 50%, Bob 30%, Charlie 20%
โ Alice owes โน450, Charlie owes โน180
Result: Net balances calculated automatically
Group: "Apartment 402"
Members: Roommate A, Roommate B, Roommate C
Expense: Groceries โน1,500 (Roommate A paid)
Split: Custom amounts
โ A: โน600, B: โน500, C: โน400 (based on what each person bought)
Track monthly expenses by category
Group: "Kerala Trip"
Members: Dad, Mom, Kid1, Kid2
Expense: Activities โน10,000
Split: Custom percentages
โ Parents 70%, Kids 30% (fair split based on benefit)
# Clone
git clone https://github.com/Kiran1510/Expense-Share.git
cd Expense-Share
# Open in Xcode
open "Expense Share.xcodeproj"
# Build
# Press Cmd+B or Product โ Build
# Run
# Press Cmd+R or Product โ Run- App Data:
~/Library/Application Support/ExpenseShare/data.json - Exports:
~/Documents/ExpenseShareExports/
To reset all data:
rm -rf ~/Library/Application\ Support/ExpenseShare/- Multiple currencies with exchange rates
- Receipt photo attachments
- Recurring expenses
- Budget tracking per category
- Monthly/yearly spending reports
- iCloud sync
- iOS companion app
- Dark/light mode themes
- Custom color schemes per group
- Import from CSV
- Export to PDF with charts
- Email summaries
- Settlement reminders
- Split by item (restaurant bills)
- Unit tests (XCTest or Swift Testing)
- UI tests
- Performance profiling
- Localization (i18n)
- Accessibility improvements
- Keyboard navigation
- Drag-and-drop expense reordering
Contributions are welcome! Here's how:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
- Follow existing code style
- Add comments for complex logic
- Test your changes thoroughly
- Update README if adding features
- No iCloud sync (local storage only)
- Single currency (โน Rupees)
- Cannot merge/split groups
- Cannot transfer expenses between groups
- No data import from other apps
Found a bug? Please open an issue with:
- Description of the problem
- Steps to reproduce
- Expected vs actual behavior
- Screenshots if applicable
This project is licensed under the MIT License - see the LICENSE file for details.
- Splitwise - The gold standard for expense splitting
- Apple SwiftUI - Modern declarative UI framework
- Swift Charts - Native charting capabilities
- SwiftUI - UI framework
- Swift Charts - Data visualization
- Combine - Reactive programming
- Foundation - Core utilities
- AppKit - macOS integration (file operations)
Kiran Sairam - kiransairam1@gmail.com
Project Link: https://github.com/Kiran1510/Expense-Share
- Launch the app - Demo data loads automatically
- Click "Manage People" - Add your friends/family
- Click "New Group" - Create your first group (e.g., "Weekend Trip")
- Add expenses - Enter who paid and how to split
- View balances - See who owes whom
- Export - Save history as CSV
๐ก Use custom amounts when you know exact splits (saves mental math)
๐ก Enable "Simplify debts" to minimize number of payments
๐ก Add categories to track spending patterns
๐ก Use Cmd+Z liberally - everything is undoable!
๐ก Export regularly to backup your data
๐ก Double-click to quickly edit expenses
๐ก Toggle charts between percentages/amounts for different insights
- โ Multi-payer expense support
- โ Three split types (equal, custom %, custom amounts)
- โ Interactive charts (pie, timeline)
- โ People management
- โ Full undo/redo support
- โ Category tracking
- โ Search, filter, sort
- โ CSV export (group & individual)
- โ Simplified debt calculations
- macOS: 13.0 (Ventura) or later
- Xcode: 15.0 or later (for development)
- Disk Space: ~10 MB for app
- Memory: ~50 MB RAM during use
- โ All data stored locally on your Mac
- โ No cloud sync (no data leaves your device)
- โ No analytics or tracking
- โ No network requests
- โ Open source (review the code yourself)
Your financial data stays 100% private and on your device.
MIT License
Copyright (c) 2025 Kiran Sairam
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
If you find this project useful, please consider giving it a โญ on GitHub!
Made with โค๏ธ using SwiftUI