# How much of each Christmas gift budget is left?

See, for each person on your list, how much of their gift budget is spent, how much is left, and whether they are over budget.

Page: https://straightgate.pages.dev/t/christmas-gift-budget/

## Formula and worked examples

### Sample family list from the spreadsheet

Inputs: people = [['Mom', 80], ['Dad', 80], ['Mia', 60], ['Leo', 60]], gifts = [['Mom', 'Wool scarf', 28, 'Bought'], ['Mom', 'Candles', 18, 'Idea'], ['Dad', 'Hardcover book', 22, 'Wrapped'], ['Mia', 'Doll', 45.99, 'Bought'], ['Leo', 'Puzzle', 19.99, 'Idea']]

Results: total_budget = 280.0, total_spent = 95.99, total_left = 184.01, people = [{'person': 'Mom', 'spent': 28.0, 'left': 52.0, 'status': 'OK'}, {'person': 'Dad', 'spent': 22.0, 'left': 58.0, 'status': 'OK'}, {'person': 'Mia', 'spent': 45.99, 'left': 14.01, 'status': 'OK'}, {'person': 'Leo', 'spent': 0.0, 'left': 60.0, 'status': 'Not started'}]

### One person over budget

Inputs: people = [['A', 50]], gifts = [['A', 'x', 60, 'Bought']]

Results: total_budget = 50.0, total_spent = 60.0, total_left = -10.0, people = [{'person': 'A', 'spent': 60.0, 'left': -10.0, 'status': 'Over budget'}]

### Ideas do not reduce the remaining budget

Inputs: people = [['A', 50], ['B', 50]], gifts = [['A', 'x', 20, 'Idea']]

Results: total_budget = 100.0, total_spent = 0.0, total_left = 100.0, people = [{'person': 'A', 'spent': 0.0, 'left': 50.0, 'status': 'Not started'}, {'person': 'B', 'spent': 0.0, 'left': 50.0, 'status': 'Not started'}]

## Related spreadsheets

- [Christmas Gift Budget Tracker Spreadsheet – Budget per Person, Gift Ideas and What Is Left (Excel)](https://straightgate.pages.dev/p/ekpaky.md) — $5. Buy: https://straightgate.gumroad.com/l/ekpaky?wanted=true
