Sub topic 1
Income, spending, and net cash flow
Every tracking system answers one question: after money came in and went out over a period, how much was left? This chapter defines the three quantities behind that question, shows how to calculate them for a month, and covers the cases that most often make the numbers wrong.
Prerequisites
This chapter assumes you have:
- Basic familiarity with online banking or a bank statement, including the idea of a posted transaction.
- Comfort with simple arithmetic and percentages.
- Optionally, basic spreadsheet skills. The Python examples use only the standard library, and you can run them as shown.
The working model
Cash flow tracking rests on three quantities, all measured over a fixed period. The period is usually one calendar month.
- Income is money that arrives and belongs to you to spend or keep. Examples are wages, freelance payments, interest, and gifts.
- Spending is money that leaves your accounts in exchange for goods, services, taxes, or interest you owe.
- Net cash flow is income minus spending. A positive number means you added to your money over the period. A negative number means you drew it down.
In symbols:
net cash flow = income - spendingNet cash flow is a flow, not a balance. A balance is how much you hold at one moment. A flow is how much a balance changed because of income and spending over a span of time. If your balance went from 1,800 to 3,013.60 over a month and nothing else happened, your net cash flow was 1,213.60.
The model has one more ingredient. Some events move money without being income or spending. Those events must be recognized and kept out of the totals. Most errors in personal tracking come from classifying them wrongly.
Which events count
Before you total anything, sort each event into one of three kinds: income, spending, or a transfer. A transfer is money that moves between accounts you own without changing how much you have in total.
| Event | Counts as | Why |
|---|---|---|
| Paycheck deposited | Income | New money arrives |
| Rent paid | Spending | Money leaves for a service |
| Move 300 from checking to savings | Transfer | You still own it |
| Pay off a credit card bill | Transfer | The purchases were counted as spending when you made them |
| Store refund for a returned item | Reduction of spending | It reverses an earlier purchase |
| Loan proceeds deposited | Neither (a loan) | You owe it back, so it is not yours to spend |
| Loan interest paid | Spending | It is the price of borrowing |
| Loan principal repaid | Transfer-like (reduces debt) | See the note below |
| Reimbursement from your employer | Reduction of spending | It reverses an expense you fronted |
The loan principal row needs care. Repaying principal does not buy anything, so it is not spending in the strict sense. It does use up cash, though, and many people want their cash flow to show that. Pick one rule and apply it every month. A common practical choice for a beginner is to treat the whole loan payment, principal and interest, as spending, and to say so in your notes.
Why credit card payments are the classic trap
Suppose you buy groceries for 86.40 on a credit card, and later pay the 86.40 from checking. If you count the purchase and also count the payment, you have counted 172.80 of spending for one purchase.
Choose one of two approaches and stay with it:
- Record each card purchase on the day it happens, in the card account. Record the later payment as a transfer from checking to the card.
- Track only the checking account. Record the card payment as spending, and accept that the spending shows up when you pay, not when you buy.
The first approach shows when the spending really happened. The second is simpler but delays and lumps the spending. If you carry a balance from month to month, the two approaches give noticeably different monthly totals.
Gross, net, and take-home income
Income has more than one measure, and mixing them is a common error.
- Gross income is what your employer agrees to pay before anything is taken out.
- Take-home pay (also called net pay) is what reaches your account after taxes, insurance, and retirement contributions are withheld.
For tracking the money you control, use take-home pay. It is what the bank statement shows, so your records will match it. If you want to see taxes and deductions as their own lines, record gross income as income and each withholding as spending. Then your totals will still reconcile. Do not do both: counting take-home pay as income and also counting withheld taxes as spending deducts taxes twice.
Sign convention and a first calculation
Records are easiest to total when each amount carries a sign. A common convention is that money entering your accounts is positive and money leaving is negative. The next chapters cover recording transactions in detail. For now, the convention gives one useful property: the sum of all amounts in a period equals the change in your total balance.
In this example each transaction also carries a kind. The program keeps transfers out of income and spending, and it treats the refund as a reduction of spending.
from decimal import Decimal
# (date, description, kind, amount); income is positive, money out is negative
transactions = [
("2026-10-01", "Paycheck", "income", Decimal("2500.00")),
("2026-10-02", "Rent", "spending", Decimal("-1200.00")),
("2026-10-04", "Grocery store", "spending", Decimal("-86.40")),
("2026-10-09", "Coffee shop", "spending", Decimal("-4.75")),
("2026-10-10", "To savings", "transfer", Decimal("-300.00")),
("2026-10-12", "Returned jacket", "spending", Decimal("20.00")),
("2026-10-15", "Paycheck", "income", Decimal("2500.00")),
("2026-10-17", "Electric bill", "spending", Decimal("-92.10")),
]
zero = Decimal("0")
income = sum((a for _, _, k, a in transactions if k == "income"), zero)
spending = -sum((a for _, _, k, a in transactions if k == "spending"), zero)
transfers = sum((a for _, _, k, a in transactions if k == "transfer"), zero)
net = income - spending
print(f"Income: {income}")
print(f"Spending: {spending}")
print(f"Net: {net}")
print(f"Moved between your own accounts: {transfers}")Running it prints:
Income: 5000.00
Spending: 1363.25
Net: 3636.75
Moved between your own accounts: -300.00Two points about this program:
- The refund is stored as a positive amount with kind
spending. Summing the spending amounts and negating the result gives 1,363.25, so the 20.00 refund reduces spending instead of inflating income. - It uses
Decimal, not floating-point numbers. Binary floats cannot represent most decimal fractions exactly, so sums such as 0.1 + 0.2 produce results like 0.30000000000000004. Money should be stored asDecimalor as whole cents. Always build aDecimalfrom a string (Decimal("86.40")), never from a float (Decimal(86.40)), or the float's error is copied in.
The transfer of 300 is not part of net cash flow of 3,636.75. Your total money still grew by 3,636.75, and 300 of it now sits in savings.
Edge cases that change the answer
Timing: when does an event belong to a month?
Two dates exist for most transactions: the date you made the purchase and the date it posted to your account. A purchase on the 30th may post on the 2nd. Choose one date field, usually the posted date, because that is what your bank statement uses, and apply it consistently. This matters later when you check your records against statements.
Irregular and annual costs
Costs that arrive once a year, such as insurance premiums, car registration, or annual subscriptions, can make one month look much worse than the others. The month's net cash flow is still correct: that was the actual flow. Do not "fix" it by moving the cost into other months in your records. Later chapters show how to plan for these costs separately, so the records stay a true history.
Negative net cash flow is information, not failure
A negative month means you spent more than you earned and the difference came out of savings or went onto credit. Whether that is a problem depends on why it happened. A planned annual bill paid from a savings fund is routine. The same shortfall in an ordinary month, repeated, is a pattern worth examining.
Borrowing can hide a deficit
If you cover a shortfall with a credit card and do not pay it off, checking-account cash flow may look fine while the debt grows. If you track only checking, the card purchases appear nowhere until the payment arrives. This is one reason to decide early which accounts are in scope.
Common errors
- Counting transfers between your own accounts as both income and spending, which inflates both totals by the same amount. Net cash flow stays correct but every percentage based on income or spending is wrong.
- Counting a credit card purchase and its payment as separate spending.
- Treating loan proceeds as income.
- Recording refunds as income instead of reductions of spending.
- Mixing gross and take-home pay in the same set of records.
- Using floating-point numbers for money.
- Changing the rules between months, so that the months cannot be compared.
A quick check catches several of these at once. If your income and spending are classified correctly, then opening balance plus net cash flow minus any money moved out of the tracked accounts, plus any money moved in, equals the closing balance. Differences point to a missed or misclassified transaction.
Summary
Income is money that arrives for you to keep or spend. Spending is money that leaves for goods and services. Net cash flow is the first minus the second, over one fixed period. Transfers, loans, and credit card payments are the events most likely to distort the totals, so decide how to treat each one before you record anything and then apply the rule the same way every month.
Exercise
In October you receive 3,200.00 take-home pay. You spend 1,450.00 on rent, 310.55 on groceries, and 95.00 on a phone bill. You move 400.00 to savings. You pay a 220.00 credit card bill for purchases that you already recorded as groceries. A store refunds 35.00 for a returned item that you had recorded as spending. What are your income, spending, and net cash flow?
Show answer
Income is 3,200.00. Spending is 1,450.00 + 310.55 + 95.00 - 35.00 = 1,820.55. The 400.00 savings transfer and the 220.00 card payment are transfers, so they are excluded; counting the card payment would double count the groceries. Net cash flow is 3,200.00 - 1,820.55 = 1,379.45.
Exercise
Your opening balance is 1,800.00 and your closing balance is 3,013.60. Your records show income of 2,500.00 and spending of 1,286.40, with no transfers out of the tracked accounts. Does the record agree with the statement?
Show answer
Yes. Net cash flow is 2,500.00 - 1,286.40 = 1,213.60. Adding that to the opening balance gives 1,800.00 + 1,213.60 = 3,013.60, which equals the closing balance.
Exercise
Why should you create a Decimal with Decimal("86.40") and not Decimal(86.40)?
Show answer
The float 86.40 is already stored as a slightly inexact binary value. Passing it to Decimal copies that inexact value. Passing the string makes Decimal parse the exact decimal digits.