SPARKLINE in Google Sheets, Mini Charts
By Szabó Gergő · Updated
SPARKLINE paints a chart in one cell from a numeric range. Options control type, color, and axis. Excel has a different Sparkline UI.
Syntax and arguments
=SPARKLINE(data, [options])- data
- Numeric row or column to plot.
- options
- Optional map such as {"charttype","bar";"color","#171914"}.
SPARKLINE examples
01
Line trend
Months in B2:G2.
=SPARKLINE(B2:G2)Default line chart in the formula cell.
02
Bar
Progress 0 to 1 in B2.
=SPARKLINE(B2,{"charttype","bar";"max",1})A single-cell progress bar.
03
Column
Weekly counts in B2:B8.
=SPARKLINE(B2:B8,{"charttype","column";"color","#7aa35a"})Tiny column chart for a dashboard row.
Common mistakes
Plotting text
SPARKLINE needs numbers. Coerce with VALUE first.
Expecting a movable Excel sparkline object
Sheets sparklines are formulas. Resize the cell, not a chart handle.
Forgetting max on a bar
Set max so 40% does not fill the whole cell.
SPARKLINE FAQ
Does Excel have SPARKLINE as a function?
Excel uses Insert > Sparklines, not a worksheet function with this name.
Can I sparkline a QUERY result?
Yes, if the QUERY returns numbers. Point SPARKLINE at that spill.
Why is the cell blank?
The range is empty, all zeros with a hidden axis, or the options map has a typo.