DEV Community

Viral Videos
Viral Videos

Posted on

How to Automate Portfolio Rebalancing in Google Sheets (Free Template)

The Problem

Every retail investor knows they should rebalance their portfolio periodically. But when you have 5+ positions across stocks, bonds, and ETFs — the math gets tedious fast. You end up either skipping rebalances entirely or doing them sporadically with rough estimates.

The Solution: A Smart Rebalancing Spreadsheet

I built a Google Sheets template that does all the calculation work for you. Here's how it works:

How It Works

  1. Set Your Targets — Enter what percentage of your portfolio each asset should represent
  2. Enter Your Holdings — Input current shares and prices
  3. Get Recommendations — The sheet calculates:
    • Current allocation percentage for each position
    • Drift from target (how far off you are)
    • Whether to buy, sell, or hold
    • Exact dollar amounts and share counts to trade

Key Formulas You Can Steal

The core rebalancing logic uses just a few spreadsheet formulas:

  • Current allocation: =CurrentValue/SUM(TotalPortfolio)
  • Drift: =CurrentAllocation - TargetAllocation
  • Action: =IF(Drift>1%,"SELL",IF(Drift<-1%,"BUY","HOLD"))
  • Trade amount: =(TargetAlloc * TotalPortfolio) - CurrentValue

Why This Matters

Systematic rebalancing:

  • Reduces risk by maintaining your target risk profile
  • Forces you to buy low and sell high automatically
  • Removes emotional decision-making
  • Takes 5 minutes instead of 30+ minutes of manual calculation

Get the Template

I've packaged this into a ready-to-use Google Sheets template. It includes:

  • Pre-filled example portfolio (VTI, BND, VXUS, GLD)
  • All formulas pre-built and tested
  • Transaction log with buy/sell tracking
  • Performance dashboard with ROI calculation
  • Step-by-step instructions

Get the Portfolio Rebalancing Tool — Google Sheets - $25

Even if you don't buy the template, try the formulas above — they'll save you hours of manual work. But if you want a polished, ready-to-use version with all the bells and whistles, grab the template and start rebalancing in 5 minutes today.


P.S. I'm releasing more investor tools every month. Follow for spreadsheets that actually make you money by keeping you disciplined.

Top comments (0)