How to use SPARKLINE in Google Sheets
In Google Sheets (verified 2026-10-24), enter =SPARKLINE(B2:F2) in a cell to draw a mini line chart of that row. Add options like =SPARKLINE(B2:F2,{"charttype","bar";"color1","#34a853"}).
Sparklines are formulas, so they copy down cleanly and update when source numbers change.
Applies to Google Sheets on the web (mobile can display them). Excel uses Insert > Sparklines instead of a worksheet function.
Build sparklines with formulas
Insert a basic sparkline
- Click an empty cell at the end of a data row.
- Type
=SPARKLINE(B2:F2)and press Enter. - Copy the formula down for other rows.
Change chart type
- Bar:
=SPARKLINE(B2:F2,{"charttype","bar"}). - Column:
{"charttype","column"}. - Winloss:
{"charttype","winloss"}for positive/negative sequences.
Colour and scale
- Add option pairs such as
"color","#4285f4"or"ymin",0. - Widen the column slightly so the mini chart is readable.
- Use conditional colours carefully — keep dashboards simple.
Our take: formula sparklines travel well
Because Sheets sparklines are formulas, they survive copy/paste and IMPORT patterns better than Excel’s drawing objects. Pair them with conditional formatting for KPI sheets.
If it fails
- Blank cell: source range empty or non-numeric.
- #N/A / errors: mixed text in the range — clean numbers first.
- Looks tiny: increase column width/row height.
- Need Excel-style UI sparklines: see Excel sparklines.
Frequently asked questions
How do I make a sparkline in Google Sheets?
Use =SPARKLINE(range) in a cell.
Can I make bar sparklines?
Yes — set charttype to bar or column in the options array.
Do sparklines print?
They print as part of the sheet; check print layout preview.
SPARKLINE vs Insert chart?
SPARKLINE stays in one cell; Insert chart creates a floating chart object.
Does Excel have SPARKLINE()?
Excel uses the Insert > Sparklines UI rather than this function.