
If you use spreadsheets to illustrate trends, outliers, seasonal increases or decreases, then sparklines, a small-scale chart that can fit into a cell, are a great way to represent this type of data. If you use Google Sheets and are looking for a quick way to represent your data without getting into the complexity of a full chart, you can use the SPARKLINE function.
Google Sheets SPARKLINE function creates miniature charts within a cell based on any range of data that you specify and in four different shapes depending on your preference: line, bar, column, and win-loss.
In this article, you’ll see different SPARKLINE examples, learn two different formula representations for the SPARKLINE function, and how to insert this formula into your Google Sheets depending on the type of chart you wish to create.
SPARKLINE Examples
Before diving into the SPARKLINE formula syntax and the two ways to represent it in Google Sheets, let’s take a look at different SPARKLINE examples according to the 4 types: line, bar, column, and win-loss.
SPARKLINE Example: Line
Line charts are most useful for displaying data that changes over consistent time intervals. The example below is straightforward; however, you’ll need to watch out for the last arguments (see next section for more details) as it will make your data express entirely different things.

SPARKLINE Example: Bar
The example below corresponds to a basic bar chart drawn from a single series of data. This is especially recommended when comparing every cell within a column, such as the formula used below. Simply make sure to change the cell to correspond to the data and set the max option to avoid taking up the whole column.

SPARKLINE Example: Column
If you’re interested in comparing a series of values against each other, then using the SPARKLINE function to draw a column chart, like the one below, is the best option. As shown below, the column chart sparklines offer two ways to express negative values.

SPARKLINE Example: Win-Loss
The win-loss chart type allows you to display binary data, such as wins and losses. You can also use colors to highlight specific data in more ways.

Now that you’ve seen several examples and what the SPARKLINE function in Google Sheets can achieve, let’s see how this function is structured by explaining all the syntax arguments.

You want to analyze Yahoo Finance data in Google Sheets but are still using copy-paste? Here’s how to import Yahoo Finance data into Google Sheets instead.
READ MORESPARKLINE Function in Google Sheets
In Google Sheets, the SPARKLINE function uses data to output a sparkline chart. Below, you’ll find the syntax of the SPARKLINE function in Google Sheets in its most basic format.
Basic SPARKLINE Formula Syntax
If you want to draw a quick and basic sparkline chart, this is the formula to use:
=SPARKLINE(data-range)
- data-range – As straightforward as it gets. This argument corresponds to the data range the formula will use to create the sparkline chart. Depending on the chart type, this range will vary, but it should always include more than two cells in a column or row.
Advanced SPARKLINE Formula Syntax
This more advanced version of the SPARKLINE function allows for deeper customization options, according to the type of chart, colors, cell dimension, etc.
=SPARKLINE(data-range,{option1,option1-value;option2,option2-value,...})
- data-range – Like in the basic formula, it refers to the data range used to create the sparkline chart, which should always include more than two cells in a column or row.
- option – This refers to the customization option, which can include the chart type, the colors, the width, rendering of the chart, etc.
- option-value – This is the value that specifies the customization option. For example, “line” to specify the chart type, or “red”, to indicate the color.
How do you insert a sparkline in Google Sheets?
Inserting a sparkline in Google Sheets is very easy. This can be achieved by entering one of the formulas described previously and entering the corresponding customization options and values, depending on your needs. Let’s first see a step-by-step explanation of how to insert a basic sparkline chart in Google Sheets using the SPARKLINE function.
Insert a basic sparkline chart in Google Sheets
To insert a basic sparkline chart in your Google Sheets, follow these steps.
- 1. Open your Google Sheets containing the data and type “=SPARKLINE” in the cell where you want to draw the sparkline chart.

- 2. Open parenthesis and select the data range to represent as a graph. Google Sheets will automatically enter it in the formula. Don’t forget to close the parenthesis and press “Enter”.

- 3. As you can see, this basic formula quickly outputs a line graph within the formula cell.

Now that you know how easy it is to create a line graph using the SPARKLINE function in Google Sheets, let’s see how to insert an advanced sparkline chart within your Google Sheets.
How to Create and Use a Pivot Table in Google Sheets?
Pivot tables can help you summarize large data sets in spreadsheets. Here's how to create a pivot table in Google Sheets.
READ MORE
Insert an advanced sparkline chart in Google Sheets
If you’re looking to represent numerical data in a more advanced way, you can use the win-loss chart type. This is especially useful when you need to display binary data.
- 1. Open your Google Sheets containing the data and type “=SPARKLINE” in the cell where you want to create the sparkline chart. As before, Google Sheets will prompt you to enter the first argument.

- 2. Select the data you want to represent as a sparkline chart, Google will enter the cell range automatically in the formula as shown below.

- 3. Type in a comma “,” followed by an opening curly bracket “{“ before entering the first customization option.

- 4. To specify the customization option between quotation marks, followed by a comma “,” and then the option value between double quotation marks. Below, you can see the option for chart type.

- 5. To include a second customization option, enter a semicolon “;” and then the option type and value. Below, you can see the option type for color.

Here, you’ve seen customization options for chart type and color. However, you can find more customization options on this Google Support page based on the type of data and formatting of sparklines.
Conclusion
Google Sheets sparklines have been available to users since 2014; however, their potential is commonly ignored by users. If you want to represent data via quick and easy charts that can be embedded within a cell, you’ll find that the SPARKLINE function in Google Sheets will meet expectations.
If you use Google Sheets regularly to store data, you’re probably familiarized with how easy it is to store, format, and analyze data. You should now know how to create from basic to advanced sparklines in your Google Sheets by adapting the SPARKLINE formula to the type of data, chart, and formatting you want.