How to use SPARKLINE in Google Sheets

Updated · DeskHowTo

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.

Jump to

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

  1. Click an empty cell at the end of a data row.
  2. Type =SPARKLINE(B2:F2) and press Enter.
  3. Copy the formula down for other rows.

Change chart type

  1. Bar: =SPARKLINE(B2:F2,{"charttype","bar"}).
  2. Column: {"charttype","column"}.
  3. Winloss: {"charttype","winloss"} for positive/negative sequences.

Colour and scale

  1. Add option pairs such as "color","#4285f4" or "ymin",0.
  2. Widen the column slightly so the mini chart is readable.
  3. 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.

Sources checked: Google Docs Editors Help: SPARKLINE. Verified October 2026.