Expense Sorted

You want to track your investment portfolio in a spreadsheet.

You've found a dozen free Google Sheets templates. They all have the same pitch: "Track your stocks! Real-time prices! Asset allocation charts!"

They all have the same problem: getting your data in.

The templates assume you'll manually type in each stock purchase. Ticker, quantity, price, date, fees. For every trade. From every account.

If you have 50 trades per quarter at Interactive Brokers, that's 200 manual entries per year. Each one a potential typo waiting to mess up your performance calculations.

There's a better way.

Why Portfolio Tracking in Spreadsheets Makes Sense

Before we talk about importing data, let's address the obvious question: why use a spreadsheet at all?

Interactive Brokers has portfolio tracking built in. So does every other broker. Why not just use that?

Three reasons:

1. Consolidated View

You probably don't have everything in one account. You've got:

  • IBKR for active trading
  • Vanguard for retirement accounts
  • Maybe a 401k at Fidelity
  • Some crypto on Coinbase

Each platform shows you their slice. None show you the whole picture.

A spreadsheet lets you consolidate everything in one place. Real asset allocation across all accounts.

2. Historical Tracking

Broker platforms show your current portfolio. Maybe they show 1-year or 3-year returns.

But what if you want to know your exact allocation on January 1, 2023? Or compare Q3 2024 to Q3 2025?

A spreadsheet becomes your historical record. You can look back at any quarter and see exactly what you owned and how it performed.

3. Custom Analysis

Maybe you want to track portfolio value against specific goals. Or calculate your real returns after accounting for deposits and withdrawals (money-weighted returns, not time-weighted).

Broker platforms give you their analysis tools. A spreadsheet gives you full control.

The Problem with Free Portfolio Tracker Templates

I've tested every popular Google Sheets investment tracker:

  • Rob Berger's Investment Tracker
  • Tracker Dan's Portfolio Tracker (Bogleheads)
  • Beanvest Stock Portfolio Tracker
  • Various templates from Tiller, Sheetlist, and Etsy

They all have similar features:

  • Google Finance integration for real-time prices
  • Asset allocation pie charts
  • Performance calculations
  • Holdings table

And they all have the same fatal flaw: you have to manually enter your transactions.

Here's what the typical workflow looks like:

  1. Log into Interactive Brokers
  2. Go to Performance & Reports → Activity Statements
  3. Generate an Activity Statement
  4. Open the PDF (or CSV if you're lucky)
  5. Find each trade
  6. Manually type it into your spreadsheet: Date, Symbol, Quantity, Price, Fees
  7. Repeat for every trade, dividend, fee, and corporate action

For an active investor with 10-15 trades per month, this is 30-45 minutes of data entry.

And data entry is where errors happen. Mix up a buy and a sell? Your position is wrong. Transpose two digits in the price? Your cost basis is off.

What Interactive Brokers Activity Statements Actually Look Like

If you've ever downloaded an IBKR Activity Statement, you know: it's comprehensive and completely overwhelming.

The CSV export contains dozens of tables:

  • Trades
  • Dividends
  • Withholding Tax
  • Fees
  • Interest
  • Corporate Actions
  • Mark-to-Market Performance
  • Cash Transactions
  • Deposits/Withdrawals

Each table has a different format. Different column headers. Different date formats.

For trades alone, you get:

  • Symbol
  • Date/Time
  • Quantity
  • T. Price (transaction price)
  • C. Price (close price)
  • Proceeds
  • Comm/Fee
  • Basis
  • Realized P/L
  • MTM P/L
  • Code (order type)

It's information overload. You don't need all of this. You need:

  • What did I buy or sell?
  • When?
  • At what price?
  • What fees did I pay?

Extracting just those fields from an IBKR activity statement is tedious.

The Manual Extraction Process (And Why It's Painful)

Here's what you have to do if you're manually importing IBKR data:

Step 1: Generate the Statement

Log into IBKR → Reports → Statements → Activity Statements → Pick date range → Generate

Wait 30-60 seconds for the PDF to generate. Download it.

Step 2: Find the Trades Table

Open the PDF. Scroll through pages of account summary information. Find the "Trades" section (usually page 3-5 depending on activity).

Step 3: Copy the Data

You can't just copy-paste from the PDF. The formatting is a mess. Tables don't align properly.

Your options:

  • Retype everything manually (slow, error-prone)
  • Download as CSV (better, but still needs heavy cleanup)
  • Use a PDF extraction tool (OCR errors, formatting issues)

Step 4: Clean the Data

The CSV export has header rows, separator rows, and multiple tables mixed together.

You need to:

  • Delete the header rows and footer rows
  • Remove separator lines
  • Split combined tables back into separate sections
  • Convert date formats to match your spreadsheet
  • Handle multi-currency transactions (USD, EUR, etc.)

Step 5: Enter Into Spreadsheet

Now you can finally copy the cleaned data into your portfolio tracker.

But you still need to:

  • Match symbols to your existing holdings
  • Calculate new cost basis averages
  • Update your shares held
  • Account for dividends separately from trades

Total time for 20 trades: 20-30 minutes.

Do this quarterly, that's 2 hours per year just on data entry.

Automatic IBKR Import: How It Should Work

Here's the workflow with automated parsing:

Step 1: Download Activity Statement from IBKR

Same as before. Generate the statement, download the CSV.

Step 2: Upload to Your Portfolio Tracker

Click "Import IBKR Statement" in your Google Sheets tracker. Drag in the CSV file.

Step 3: Auto-Parsing

The import tool:

  • Identifies the Trades table automatically
  • Extracts Symbol, Date, Quantity, Price, Fees
  • Identifies the Dividends table
  • Extracts dividend payments
  • Identifies the Fees table
  • Extracts account fees and interest

Step 4: Review and Import

You see a preview:

TRADES:
- 2025-09-15: Bought 10 shares AAPL at $178.42 (Fee: $0.35)
- 2025-09-18: Sold 5 shares TSLA at $256.83 (Fee: $0.35)

DIVIDENDS:
- 2025-09-20: VTI dividend $12.84

FEES:
- 2025-09-30: Market data subscription -$4.50

You review, click "Import," and it updates:

  • Holdings table (adjusts share counts)
  • Transaction log (records all trades)
  • Income tracking (records dividends)
  • Cost basis calculations (updates averages)

Total time: 90 seconds.

What the Automated Parser Actually Does

Let's get specific about what makes IBKR parsing complex and how automation solves it.

Challenge 1: Multi-Table CSV Structure

IBKR activity statements don't have one clean table. They have multiple sections with headers and separators:

Statement,Header,Field Name,Field Value
Statement,Data,Title,Activity Statement
...
[blank rows]
Trades,Header,Symbol,Date/Time,Quantity,T. Price,C. Price,...
Trades,Data,AAPL,2025-09-15 10:30:42,10,178.42,178.50,...
Trades,Data,TSLA,2025-09-18 14:22:15,-5,256.83,257.10,...
[blank rows]
Dividends,Header,Currency,Date,Description,Amount
Dividends,Data,USD,2025-09-20,VTI (US1234567890),12.84

What the parser does:

  • Scans the CSV for section markers ("Trades,Header", "Dividends,Header", etc.)
  • Extracts data rows for each section
  • Ignores separator rows and metadata

Challenge 2: Date/Time Format Conversion

IBKR uses ISO format with timestamps: "2025-09-15 10:30:42"

Your spreadsheet uses simple dates: "9/15/2025"

What the parser does:

  • Strips the time component
  • Converts to MM/DD/YYYY format
  • Handles timezone differences if needed

Challenge 3: Buy vs. Sell Detection

IBKR indicates sell orders with negative quantity: "-5" means you sold 5 shares.

What the parser does:

  • Looks at the quantity sign
  • Positive → Buy transaction
  • Negative → Sell transaction
  • Converts to absolute quantity + transaction type

Challenge 4: Multi-Currency Handling

You might have trades in USD, EUR, GBP, etc.

What the parser does:

  • Detects the currency column
  • Keeps transactions in their original currency OR
  • Converts to your base currency using the rate from the statement

Challenge 5: Corporate Actions

Stock splits, mergers, spinoffs—these appear in the Corporate Actions table with special formatting.

What the parser does:

  • Identifies corporate action types
  • Adjusts share quantities automatically
  • Logs the action for your records

Beyond Just Importing: What Makes a Good Portfolio Tracker

Automated import solves the data entry problem. But a truly useful portfolio tracker does more.

1. Automatic Price Updates

Uses =GOOGLEFINANCE() to pull current prices every 20 minutes during market hours.

Your portfolio value updates without manual work:

| Symbol | Shares | Cost Basis | Current Price | Value    | Gain/Loss |
|--------|--------|------------|---------------|----------|-----------|
| AAPL   | 15     | $175.20    | $178.50       | $2,677.50| +$49.50   |
| VTI    | 50     | $218.40    | $224.15       | $11,207.50| +$287.50 |

2. Asset Allocation Tracking

Automatically categorizes your holdings:

  • US Stocks
  • International Stocks
  • Bonds
  • Real Estate (REITs)
  • Cash

Shows your current allocation vs. your target allocation:

Asset Class       | Current | Target | Rebalance Needed
------------------|---------|--------|------------------
US Stocks         | 68%     | 60%    | Sell $2,400
International     | 17%     | 25%    | Buy $2,400
Bonds             | 13%     | 15%    | Buy $600
Cash              | 2%      | 0%     | -

3. Performance Tracking Over Time

Logs your portfolio value at the end of each quarter.

You can see growth over time, even as you add new deposits:

Quarter  | Portfolio Value | Deposits | Investment Gain
---------|-----------------|----------|------------------
Q1 2025  | $45,230         | $5,000   | +$1,230 (2.8%)
Q2 2025  | $52,180         | $6,000   | +$950 (1.9%)
Q3 2025  | $59,420         | $5,000   | +$2,240 (4.0%)

4. Dividend Income Tracking

Separate tab for dividend and interest income.

Annual and quarterly views:

Year  | Q1    | Q2    | Q3    | Q4    | Total
------|-------|-------|-------|-------|-------
2024  | $284  | $312  | $298  | $340  | $1,234
2025  | $312  | $345  | $368  | -     | $1,025

5. Transaction History

Complete log of every trade, auto-imported from IBKR:

Date       | Type | Symbol | Shares | Price   | Fees  | Total
-----------|------|--------|--------|---------|-------|--------
09/15/2025 | Buy  | AAPL   | 10     | $178.42 | $0.35 | $1,784.55
09/18/2025 | Sell | TSLA   | 5      | $256.83 | $0.35 | $1,284.05

You can search, filter, and analyze your trading history without logging into IBKR.

Multi-Broker Support: Beyond IBKR

Interactive Brokers isn't the only broker with complicated activity statements.

A good portfolio tracker should handle:

  • Vanguard (different CSV format, different column headers)
  • Fidelity (PDF-heavy, limited CSV export)
  • Schwab (merged with TD Ameritrade, two different formats)
  • Robinhood (limited export options)

The import system should:

  • Auto-detect which broker format you're uploading
  • Parse accordingly
  • Combine transactions from multiple brokers into one consolidated view

This way you can track IBKR for active trading, Vanguard for index funds, and Fidelity for your 401k—all in one spreadsheet.

Privacy and Data Security

Broker account data is sensitive. Here's what matters:

Where Does Your Data Go?

Bad approach: Upload to a third-party server for parsing, get results back.

Good approach: Parse the CSV locally in your browser using JavaScript. Upload only the cleaned data directly to your own Google Sheet.

Your IBKR activity statement should never touch anyone else's servers.

What About Google Sheets Security?

Your Google Sheet is in your Google Drive, protected by your Google account security.

You control:

  • Who has access (just you, or shared with a partner)
  • Whether it's encrypted at rest (Google handles this automatically)
  • Export/backup to your local machine anytime

This is fundamentally different from giving a third-party app read access to your broker account via API.

When Manual Entry Still Makes Sense

Automated import isn't always necessary. Stick with manual entry if:

You make fewer than 10 trades per year. The time saved doesn't justify any setup. Just type in your trades quarterly.

You only track individual stock picks, not full portfolio. If you're tracking 3-5 stocks for fun and your real retirement money is in a target-date fund you're not tracking, manual entry is fine.

You want simplicity above all. Automated tools add complexity. If you'd rather keep your spreadsheet dead simple and spend 15 minutes per quarter on data entry, that's valid.

For everyone else—especially active investors at IBKR with 20+ transactions per quarter—automated import saves hours per year and eliminates data entry errors.

Getting Started

Here's how to set up a portfolio tracker with IBKR import:

Option 1: Start With a Template

Download a pre-built Google Sheets template with:

  • Holdings table
  • Transaction log
  • Dividend tracker
  • Asset allocation charts
  • IBKR import functionality built in

Customize the asset categories and target allocation to match your strategy.

Option 2: Build Your Own

If you prefer to build from scratch:

  1. Create holdings table with columns: Symbol, Shares, Cost Basis, Current Price (from GOOGLEFINANCE), Value, Gain/Loss

  2. Add transaction log to record all trades

  3. Set up IBKR import using a browser extension or Apps Script that parses the activity statement format

  4. Build dashboards with asset allocation, performance tracking, and dividend income

The template approach is faster. Building your own gives you full control.

The Quarterly Workflow

Once you're set up, here's your maintenance routine:

End of Quarter:

  1. Log into IBKR → Generate Activity Statement for the quarter
  2. Download CSV
  3. Open your portfolio tracker
  4. Click "Import IBKR Statement"
  5. Upload the CSV
  6. Review parsed transactions (30 seconds)
  7. Click "Import"

Total time: 2 minutes.

The tracker automatically:

  • Updates share quantities
  • Recalculates cost basis
  • Records dividends
  • Updates your asset allocation
  • Logs quarterly portfolio value

You review the updated allocation and decide if you need to rebalance.

Your Portfolio Is Only as Good as Your Data

Investment returns compound over decades.

The difference between a 7% average return and an 8% average return is massive over 30 years.

But you can't optimize what you don't track accurately.

Manually entering trades feels simple, but every typo, every skipped dividend, every forgotten fee compounds into inaccurate performance data.

You might think you're beating the market when you're actually underperforming.

Automated import from Interactive Brokers gives you accurate, complete data without manual work.

Track what you own. Track what you earn. Track how you're actually doing.

Then make better decisions.

Calculate Your Financial Freedom

How much money do you need to never worry about work again?

Calculate My F*** You Money

Financial Dashboard

Upload bank statements, get AI insights

Try Free →

F*** You Money

Calculate financial independence number

Calculate →

Google Sheets Add-on

AI categorization in your spreadsheet

Get Add-on →