To make a percentage bar in Google Sheets, put your percentage in one cell and use the SPARKLINE function in the next cell to draw a live in-cell bar. For example, a value of 75% can appear beside a bar that fills three-quarters of its available space. You will need a Google Sheets file, a column of percentage values, and a web browser; no add-on is required.
What You’ll Need
- A Google Sheets spreadsheet opened in a web browser.
- A column containing numeric percentages, such as 25%, 75%, or a calculated percentage. The values should represent numbers, not text that merely looks like a percentage.
- An empty column beside the percentages for the visual bars. Keeping the numeric value and bar in separate cells makes the figures easy to read, sort, and check.
Step-by-Step
-
Arrange the data. Put each task, product, or other label in one column and its percentage in the next. For instance, column A might contain project names and column B might contain completion percentages. Leave column C empty for the bars. If the percentage represents progress, decide what 100% means before entering values, such as finishing all 24 planned tasks.
-
Enter or calculate a percentage. You can type a value such as
75%directly into a cell; Sheets stores that as the decimal value 0.75. If you have a completed count and a target count instead, calculate the ratio first. With completed units in A2, the target in B2, and the result in C2, enter:=IFERROR(A2/B2,"")For example, if A2 is 18 and B2 is 24, the result is 0.75, which is 75% when formatted as a percentage. The formula leaves the result blank if the target is zero or missing, rather than displaying an error.
-
Format the percentage value. Select the cells containing the numeric results, then choose Format > Number > Percent. Increase or decrease decimal places with the toolbar controls if you need more or less precision. This changes how the number is displayed, not its underlying value: 75% is stored as 0.75. That distinction matters because the bar formula will use a maximum of 1 for a range from 0% to 100%.
-
Add a bar beside the value. In this example, the percentage is in C2 and the bar will go in D2. Enter this formula in D2:
=IF(C2="","",SPARKLINE(C2,{"charttype","bar";"max",1;"color1","#4CAF50"}))The formula assumes C2 contains a numeric percentage from 0 to 1, such as 0.75 for 75%. The bar uses a maximum of 1 and a green fill, so 75% fills about three-quarters of the cell’s bar area. The
IFwrapper leaves D2 empty when C2 is blank. You can replace#4CAF50with another color name, such asblue, or a valid hexadecimal color code. -
Make the bar easy to see. Widen column D by dragging the boundary between its header and the next column. Increase the row height if the bar looks too thin. You can also select the bar cells and use the horizontal alignment and text color controls to suit your sheet. The sparkline draws inside its cell, so enough column width is important; it is not a separate chart object that you resize by dragging handles.
-
Copy the formula for other rows. Select D2 and drag the small square at its lower-right corner down through the rows that have percentages. Sheets adjusts the reference for each row, so the next formula uses C3, then C4, and so on. You can also copy D2 and paste it into the other cells in column D. Check that each bar is beside the correct percentage after filling.
-
Check the result and keep the value visible. Compare a few bars with their percentages: 25% should be shorter than 50%, and 100% should reach the full bar length. Keep the percentage in its own column, because a bar alone does not show an exact value. Add a heading such as “Progress” above the percentage and “Bar” above the sparkline column so other readers know what each column means.
Common Mistakes
- Using 75 instead of 75%. The formula with
"max",1expects a value between 0 and 1. Typing 75 as a plain number means 75, not 75%, so the bar reaches its maximum. Enter 75% or use 0.75 for a three-quarter bar. - Setting the maximum to 100 when the input is a real percentage. A percentage cell containing 75% stores 0.75. If the sparkline maximum is 100, that value produces a very short bar. Use a maximum of 1 for percentages stored as percentages, or use a maximum of 100 only when the cells contain numbers such as 75.
- Putting the percentage in as text. A value entered with a leading apostrophe or copied from a source as text may not behave like a number. Re-enter it as a number or convert the source data before relying on the bar. Formatting text as Percent does not convert it into a numeric percentage.
- Expecting the bar to display the exact number. A sparkline is a compact visual, not a label. Keep the percentage in a neighboring cell; use that value for precise reading, calculations, and sorting.
- Looking for Excel-style data bars in conditional formatting. Google Sheets conditional formatting does not provide Excel’s native Data Bars rule. In Sheets, use
SPARKLINEfor an in-cell bar or insert a chart for a larger visual.
Tips
- Use the same scale in a group. Set every bar in a comparison to the same maximum, normally 1 for a 0%–100% range. If each row uses a different maximum, bars of equal length can represent different percentages and comparisons become misleading.
- Pick a color with enough contrast. A medium or dark color is usually more visible than a pale shade, especially on a white background. Keep the color consistent across a progress column unless color itself communicates a meaningful status.
- Keep percentages within the intended range. If progress cannot exceed 100%, check for values below 0% or above 100%. With a maximum of 1, values above 1 appear full length, so a bar will not distinguish 110% from 150% by length.
- Freeze or label headings on long sheets. A clear heading and a frozen header row help readers understand the values when they scroll. In the browser, use View > Freeze to keep the relevant header row visible.
- Use a chart when the comparison needs context. A sparkline is best for a compact progress indicator beside each row. If you need axes, labels, a legend, or a presentation-sized comparison, select the data and choose Insert > Chart, then configure the chart in the Chart editor.
Troubleshooting
- The formula shows an error. Check that the opening and closing parentheses are present, the cell reference points to the percentage, and the option pairs are inside the braces. In some spreadsheet locales, formula argument and array separators differ. If the formula is rejected, use the separators suggested by your Sheets locale settings while keeping the option names and values paired correctly.
- The bar is empty or much too short. Click the percentage cell and look at its actual value in the formula bar. A displayed 75% should be stored as 0.75. If it contains 0.75 but the bar is nearly empty, confirm that the sparkline maximum is 1. If it contains 75, either convert the cell to a true percentage or set a consistent maximum of 100.
- Every bar looks completely full. The values may be entered as whole numbers while the formula expects decimals. For example, 80 with a maximum of 1 is already beyond the scale. Convert the values to percentages, or use a maximum appropriate to the data, and ensure the same maximum is applied to every row you compare.
- The bar column looks blank. Confirm that the source cell is not empty and contains a number. Widen the bar column and increase row height; a very narrow column or short row can make the sparkline hard to notice. Also check whether the bar formula itself was copied down to that row.
- Some rows show unexpected bars. Inspect the source values for blanks, text, negative numbers, or percentages over 100%. Check that the copied formula references the matching row. For example, the bar in D4 should refer to C4, not keep referring to C2.
Frequently Asked Questions
Can I make a percentage bar without a formula?
For a live, compact bar inside a cell, the practical Sheets method is the SPARKLINE formula. You can instead insert a chart for a larger visual, but that is a different layout and takes more space. Conditional formatting in Sheets does not offer Excel-style data bars.
Can I show the percentage and bar in the same cell?
A sparkline cell is intended to show the bar, not both an exact percentage label and a bar in a dependable combined format. Keep the percentage in one column and the bar in the next. This also makes it easier to sort and use the numeric value in calculations.
How do I change the bar color?
Edit the color1 option in the formula. For example, replace #4CAF50 with blue or another supported color value. If you want a different color for different rows, adjust each row’s formula or use a separate design approach; the color does not automatically change based on the percentage.
Can a bar show progress above 100%?
Yes. Choose a maximum that covers the range you want to compare, such as 1.2 for values up to 120%, and use that same maximum for the entire set. If the maximum stays at 1, any value at or above 100% appears full, so the bar cannot show how far beyond the target it goes.
Will the bars update when I change a percentage?
Yes. A sparkline recalculates when its referenced value changes. If you edit a task’s percentage or change the formula that calculates it, the corresponding bar updates automatically, provided its sparkline formula still points to the correct cell.
Does this work in Excel too?
This guide is for Google Sheets in a web browser. Excel has its own Conditional Formatting data bars, but the menus and behavior differ; do not assume the Google Sheets SPARKLINE formula is the same as Excel’s built-in data-bar feature.
Related
- Compress Pictures in PowerPoint: Step-by-Step Guide
- Compare Two Documents in Word: Create a Redline
- Compare Documents in Word and Create a Redline
Try it: the Date Difference Calculator: days, months, years and weekdays between two dates, with the DATEDIF formulas.
More in How-to basics
- PowerPoint Notes: How to Present With Speaker NotesTo present with speaker notes in PowerPoint, add your talking points in the Notes pane, then start the…
- How to Change HTML Email View and Settings in OutlookTo make Outlook compose messages in HTML, change the default message format: in classic Outlook for Windows, go…
- How to Double Space in Word for FreeTo double-space text in Word for free, open your document in Word for the web, select the text,…
- How to Archive Emails by Date Range in OutlookTo archive Outlook emails from a particular date range, search for messages received within the dates, check the…
- Excel Column Selection: Select One or More ColumnsIn Excel for Microsoft 365 on Windows, click a column letter to select that entire column, or click…
- How to Add a Watermark in Word 365, Text or PictureTo add a watermark in Word 365 on Windows, open the document and choose Design > Watermark, then…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.