How to Use SPARKLINE in Google Sheets (Mini Charts in a Cell)

By Gerard Fernandez · Updated · 1 min read

SPARKLINE draws a small chart inside one cell. It's perfect for showing a trend next to each row of a table, such as monthly sales per product, without building a full chart.

A basic line sparkline

With monthly values in B2:G2, type in H2:

=SPARKLINE(B2:G2)
SPARKLINE formulas in Google Sheets drawing a small trend line for each product's monthly sales
One SPARKLINE per row shows at a glance which products are growing and which are falling.

Fill the formula down and each row gets its own mini chart. Make the column wider or the row taller to make the sparkline bigger.

Other chart types

Add options as a list in curly brackets: {"option", value}, separated by semicolons.

ChartFormula
Column chart=SPARKLINE(B2:G2, {"charttype", "column"})
Win/loss (positive vs negative)=SPARKLINE(B2:G2, {"charttype", "winloss"})
Progress bar=SPARKLINE(B2, {"charttype", "bar"; "max", 100})

Change colors and width

=SPARKLINE(B2:G2, {"color", "green"; "linewidth", 2})

For column charts, "color" sets all columns, and you can highlight extremes with "highcolor" and "lowcolor".

A progress bar for goals

With a value in B2 and a target of 100:

=SPARKLINE(B2, {"charttype", "bar"; "max", 100; "color1", "#1a7f5a"})

The bar fills the cell in proportion to B2 out of 100.

Frequently asked questions

Why does SPARKLINE show an error with commas?

Inside the curly brackets, a comma separates an option from its value and a semicolon separates one option from the next. In some locales Sheets uses different separators; if a formula copied from here fails, check File → Settings → Locale.

Can I add labels or axes?

No. Sparklines are deliberately minimal. For labels and axes, use a normal chart.