Sparkline Trends
Create mini charts inside cells to visualize spending trends, account balances, and financial progress.
=SPARKLINE(data_range, {"charttype","line"}) How It Works
SPARKLINE creates a tiny chart inside a single cell. This is perfect for dashboards - see trends at a glance without taking up space with full charts.
Syntax
=SPARKLINE(data, [options])
- data: Range of values to chart
- options: Chart type and styling (optional)
Example
Monthly Spending Trend:
| Category | Jan | Feb | Mar | Apr | May | Jun | Trend |
|---|---|---|---|---|---|---|---|
| Groceries | 420 | 385 | 450 | 410 | 430 | 395 | 📈 |
| Dining | 180 | 220 | 165 | 200 | 190 | 175 | 📈 |
Formula in H2: =SPARKLINE(B2:G2)
Chart Types
Line Chart (Default)
=SPARKLINE(B2:G2, {"charttype","line"})
Best for: Trends over time
Bar Chart
=SPARKLINE(B2:G2, {"charttype","bar"})
Best for: Comparing values
Column Chart
=SPARKLINE(B2:G2, {"charttype","column"})
Best for: Category comparisons
Win/Loss Chart
=SPARKLINE(B2:G2, {"charttype","winloss"})
Best for: Positive vs negative (profit/loss, over/under budget)
Styling Options
Custom Colors
=SPARKLINE(B2:G2, {"charttype","line"; "color","green"})
Multiple Options
=SPARKLINE(B2:G2, {
"charttype","line";
"color","#4285f4";
"linewidth",2;
"firstcolor","#ea4335";
"lastcolor","#34a853"
})
Bar Chart with Negative Colors
=SPARKLINE(B2:G2, {
"charttype","bar";
"negcolor","red";
"color","green"
})
Budget Dashboard Examples
Spending vs. Budget Progress
Show budget used as a progress bar:
=SPARKLINE({spent, budget-spent}, {"charttype","bar"; "color1","#4285f4"; "color2","#e0e0e0"})
| Category | Budget | Spent | Progress |
|---|---|---|---|
| Groceries | $500 | $325 | [███████░░░] |
Over/Under Budget
Highlight when over budget:
=SPARKLINE({spent/budget}, {
"charttype","bar";
"max",1.2;
"color1",IF(spent>budget,"red","green")
})
Monthly Trend with Target Line
=SPARKLINE(B2:G2, {
"charttype","line";
"color","blue";
"ymin",0;
"ymax",600
})
Net Worth Tracker
| Account | 6-Month Trend | Current |
|---|---|---|
| Checking | =SPARKLINE(history!B2:G2) | $5,420 |
| Savings | =SPARKLINE(history!B3:G3) | $18,500 |
| 401(k) | =SPARKLINE(history!B4:G4) | $85,200 |
Win/Loss for Budget Categories
Show months on/under budget:
| Category | Budget Status (6 mo) |
|---|---|
| Groceries | =SPARKLINE(B2:G2-budget, {“charttype”,“winloss”}) |
Green bars = under budget, Red bars = over budget
Investment Performance
Portfolio Value Trend
=SPARKLINE(portfolio_history, {
"charttype","line";
"color","green";
"linewidth",2
})
Daily Change Indicator
=SPARKLINE({yesterday_value, today_value}, {
"charttype","bar";
"color",IF(today>yesterday,"green","red")
})
Building a Mini Dashboard
Create a compact financial overview:
| Metric | Value | Trend |
|---|---|---|
| Net Worth | $142,000 | =SPARKLINE(nw_history) |
| Savings Rate | 22% | =SPARKLINE(sr_history) |
| Debt | $8,500 | =SPARKLINE(debt_history) |
All trends visible without scrolling or switching tabs.
Dynamic Ranges
Last N Months
=SPARKLINE(OFFSET(A1, 0, MAX(0, COUNT(A1:Z1)-6), 1, MIN(6, COUNT(A1:Z1))))
Non-Empty Values Only
=SPARKLINE(FILTER(B2:M2, B2:M2<>""))
Pro Tips
-
Consistent scales - set ymin/ymax for comparable sparklines:
{"ymin",0; "ymax",1000} -
Highlight endpoints - use firstcolor/lastcolor to emphasize start and end
-
Empty values - SPARKLINE skips empty cells, which can distort trends
-
Row height - increase row height for taller, more visible sparklines
-
Color meaning - use green for good trends (savings up, debt down), red for concerning
Common Errors
- #N/A or blank: Data range might be empty or contain text
- Flat line: Check that ymin/ymax aren’t cutting off your data
- Wrong direction: For debt, invert so down is good:
=SPARKLINE(-1*debt_values)