Sparkline generator — tiny trend charts for tables and reports

Paste a list of numbers and get a small, axis-free trend chart, 160 × 40 pixels by default, that fits inside a table cell, a KPI card or a line of text, with the change from first to last value worked out for you.

Live demo · real result from this tool
Separated by commas, spaces or new lines. With spaces or new lines between values, 1,234.5 is one number.
Style

Sparkline

Sparkline
Last value33
Change
175%
Minimum
12
Maximum
33
Values
12

Values

#Value
112
215
314
418
521
619
724
823
927
1030
1128
1233

Processed on your device — nothing is uploaded.

How to use the sparkline generator

  1. Paste or type your values into Numbers, oldest first.
  2. Pick a Style: Line or Columns.
  3. For a line, choose whether to Fill under the line and Mark the last value. For either style, choose Mark the minimum and maximum.
  4. Set the Colour, Width (40–1,200 px), Height (12–400 px) and Background.
  5. Copy the SVG or download sparkline.svg. The stats show the last value, change, minimum, maximum and how many values were read.

What it does and when to use it

Sparklines were made for dense displays: a column of weekly sales in a report, a share price beside a company name, the last twelve readings next to a KPI. The small picture answers “is this going up or down, and is it steady?” in the space of a word.

The SVG has a fixed pixel size and no text, so it drops straight into a document or web page; pick Transparent as the Background for coloured cards. For a single headline number against a goal, a gauge chart is clearer. For a full chart with axes and labels, use the line chart maker or the bar chart maker.

How it works

In the Line style the points are spaced evenly across the width, and the vertical range runs from your smallest value to your largest, with a few pixels of padding so markers are not clipped. The fill under the line is the same colour at 18% opacity. In the Columns style the range always includes zero: positive columns rise from a zero baseline and negative ones hang below it in red.

The SVG has a <desc> such as “Sparkline of 12 values from 12 to 33; minimum 12, maximum 33” for screen readers. Everything is drawn in your browser.

Worked examples

Steady growth (the sample). Twelve values from 12 to 33 give:

Last value: 33
Change: 175%
Minimum: 12
Maximum: 33
Values: 12

Gains and losses as columns. 5 -3 8 -1 in the Columns style draws two columns above zero and two red ones below. The stats show Minimum: -3, Maximum: 8 and a change of -120%.

A body temperature log. Six readings from 98.6 to 99.0 in red at 120 × 30 px. The line climbs to 101.2 and falls back, but the change from first to last is only Change: 0.41%. The shape shows the fever; the percentage alone would hide it.

Limits and tips

  • There are no axis labels, so put the actual latest number next to the sparkline when you use it.
  • Use one width and height for every sparkline in a table.
  • For a PNG, run the SVG through the SVG to PNG converter.

Frequently asked questions

What is a sparkline?
A chart the size of a word, with no axes, gridlines or labels. It shows the shape of a series (rising, falling, spiky or flat) next to the number it belongs to, so readers see the trend without a full chart.
How is the Change figure worked out?
As (last value minus first value) divided by the size of the first value, times 100. For 12 to 33 that is 21 ÷ 12 × 100 = 175%. If the first value is 0 the change cannot be expressed as a percentage, so a dash is shown.
Why does a small change look dramatic in the line style?
The line style stretches the smallest value to the bottom and the largest to the top, so even a 1% wobble fills the height. That is normal for sparklines, which show shape rather than size. Use the Columns style if you need a zero baseline.
What do the coloured dots mean?
In the line style a green dot marks the maximum, a red dot the minimum and a dot in the line colour the last value. In the Columns style the highest column is drawn darker, the lowest lighter, and negative columns red.
Can I paste a column from a spreadsheet?
Yes. Numbers can be separated by commas, semicolons, spaces or new lines. When the values are separated by spaces or new lines, as in a pasted spreadsheet column, a comma followed by three digits is read as a thousands separator, so 1,234.5 stays one number. In a list joined only by commas, such as 100,200,300, each comma separates two values. Values such as $45 or 12% are understood, and words are skipped.

Written by the ToolsRift team · Last updated

Pages are drafted with AI assistance and checked by automated tests. How we write and check pages.

Was this tool useful?

Report a problem

Start typing to search every tool.

↑ ↓ to moveEnter to openEsc to close