To make a log graph in Google Sheets, put your data in columns, select it, choose Insert > Chart, and set the chart’s axis to a logarithmic scale under Customize in the Chart editor. Use positive numeric values on any axis you make logarithmic; zero and negative values cannot be plotted on a log scale. This is useful when values span several orders of magnitude and a regular chart makes smaller values hard to compare.
What You’ll Need
- A Google account and Google Sheets in a web browser.
- A data table with a header for each column. For a logarithmic axis, the values in that axis’s data must be numbers greater than zero.
- A clear idea of which axis should be logarithmic: the vertical axis, horizontal axis, or both. A chart with only one log axis is often called a semi-log graph; one with both axes logarithmic is a log-log graph.
Step-by-Step
- Arrange the data in columns. Put each variable in its own column and add a descriptive header in the first row. For example, a table might have Distance in column A and Signal in column B, with distances of 1, 10, 100, and 1000 and positive signal readings beside them. Keep the values as numbers, not text that merely looks numeric. Avoid putting units inside the data cells; put units in the header, such as Distance (m), instead.
- Choose the kind of chart that fits the data. If the horizontal values are measurements such as time, distance, or concentration, use a scatter chart so Sheets treats them as numeric x-values. If the horizontal values are categories or evenly spaced labels, a line chart may be more suitable. For the example with numerical distances, select the data table and go to Insert > Chart. Google Sheets creates a chart and opens the Chart editor on the right.
- Check the chart’s data range and series. In the Chart editor’s Setup tab, confirm that the data range includes the headers and all the rows you want to graph. For a scatter chart, check that the first column is assigned as the X-axis and the signal column appears under Series. Enable Use row 1 as headers if Sheets has not recognized the headings. If the chart shows the wrong fields, correct the X-axis and Series entries here rather than editing the values on the chart.
- Select or confirm the chart type. In Setup, open the Chart type menu and choose Scatter chart for two numerical variables. For a category-based series, choose the appropriate line chart instead. A scatter chart is especially useful when x-values are irregularly spaced: a distance of 100 should appear farther from 10 than 10 appears from 1 on a linear x-axis. The logarithmic setting changes the scale of an axis; it does not automatically change the chart type.
- Set the vertical axis to logarithmic. In the Chart editor, select Customize, open Vertical axis, and turn on Log scale. The vertical spacing will represent equal multiplicative changes rather than equal additions. For instance, 10, 100, and 1000 occupy equal intervals on a base-10 logarithmic scale, even though the numerical differences between them are not equal. If Log scale is unavailable or the plotted series disappears, check that the vertical-axis values are numeric and positive.
- Set the horizontal axis too, if needed. For a log-log graph, open Customize > Horizontal axis and turn on Log scale as well. This option is useful when both variables cover a wide range, such as a response measured across concentrations from 0.1 to 1000. Do not turn it on just for appearance: choose it only when a logarithmic interpretation of the x-values is meaningful. A horizontal log axis also requires positive numeric x-values.
- Add titles and units. In Customize, open Chart & axis titles. Choose the chart title, horizontal axis title, or vertical axis title from the title-type menu, then enter clear labels in Title text. For example, use Distance (m) and Signal (mV). If an axis is logarithmic, say so in a title or chart note when that context would help readers understand the spacing. Avoid vague titles such as Results.
- Review the scale and plotted points. Look at the tick labels and check that the values appear in the intended order. A log axis may show labels at powers of ten, with smaller intermediate gridlines or labels depending on the chart and range. Confirm that no rows were missed and that the apparent trend makes sense against the original table. Do not infer exact values from visual spacing alone; read the axis labels or hover over a point for its plotted values.
- Resize, place, and preserve the chart. Close the Chart editor when you are finished. Drag the chart by its border to reposition it and use its corner handles to resize it. Sheets saves edits automatically. If you change the source table later, check that the chart range includes new rows and that the log-scale setting remains appropriate. To reuse the chart elsewhere, use the chart’s three-dot menu and choose Copy chart, then paste it where needed.
Common Mistakes
Leaving zeros or negative numbers in the selected axis. A logarithm is not defined for zero or negative values, so those points cannot appear normally on a log axis. A blank, missing point, or chart warning may result. Check every row in the affected series, not just the first and last values.
Confusing a log axis with transformed data. Turning on Log scale changes how the chart spaces and labels the axis; it does not replace the numbers in the sheet with their logarithms. In most cases, chart the original measurements and set the axis scale. If you manually transform the data and also set a log scale, you apply two different operations and the graph no longer represents what you intended.
Using a line chart for irregular numeric x-values. Line charts can treat horizontal positions as categories, making gaps between labels appear equal. Use a scatter chart when the actual distance between x-values matters. Also avoid applying a log scale to labels that are words, dates used as categories, or other nonnumeric values.
Reading log spacing as ordinary addition. On a logarithmic axis, equal visual gaps represent equal ratios, not equal differences. The move from 1 to 10 takes the same space as 10 to 100. State this clearly if other people will use the chart to make comparisons.
Tips
- Use a log scale when values span a wide range or when proportional changes matter. It is not automatically better for every dataset; a linear scale is easier to interpret when values stay in a narrow range and absolute differences are the focus.
- Start with one logarithmic axis. Add a second only if the x-variable also spans several powers of ten and a log-log view answers the question you are investigating.
- Keep the raw measurements in the sheet. This makes it easier to verify the chart, reuse the data, and switch back to a linear scale without reconstructing the original values.
- Use clear units and a descriptive title, and consider adding a short note that explains the log axis. This is particularly helpful when sharing a chart with readers who may expect equal spacing to mean equal differences.
- If your data has several series, check that every series plotted against a logarithmic axis has positive values. One series with zero or negative entries can make the chart look incomplete or confusing.
Google Sheets is browser-based, so the menu paths above apply to its web interface. Excel has a similar logarithmic-axis setting, but its chart-formatting controls and menu paths differ; do not look for the Google Sheets Chart editor in Excel.
Troubleshooting
The Log scale option is missing or disabled. Confirm that you selected a chart type and axis that support a numeric scale, such as a scatter chart. A category axis may not offer the same setting. If needed, change the chart to a scatter chart from Chart editor > Setup > Chart type, then reopen Customize and the relevant axis section.
Some points vanish after enabling the setting. Search the plotted column for zero, negative, blank, or text-formatted entries. A log axis can show only positive numeric values. Correct a data-entry mistake if there is one. If zero is a valid observation, do not disguise it as a tiny positive number; use a linear scale, omit that point with an explanation, or make a separate chart that can represent it honestly.
The chart looks flat or has an unexpected range. Check whether the data range includes accidental values, such as a stray zero, a number entered in the wrong unit, or a header treated as data. Then confirm which axis you changed: enabling the vertical scale does not make the horizontal scale logarithmic. If the data covers only a small range, a log scale may compress the differences rather than clarify them, so compare it with a linear version.
The x-values are evenly spaced when they should not be. Switch to a scatter chart and verify that the first data column is assigned to the X-axis. Make sure those cells contain numbers rather than text strings. For a log-log chart, also check that every x-value is positive before enabling the horizontal log scale.
The chart does not include newly added rows. Open the chart editor’s Setup tab and inspect the data range. Expand it to include the added rows, or place new records directly below the existing table so the range can be updated as expected. After changing the range, verify the series and axis settings again.
Frequently Asked Questions
Can I make only the vertical axis logarithmic?
Yes. In the Chart editor, choose Customize > Vertical axis and turn on Log scale. Leave Horizontal axis unchanged for a semi-log chart.
Can both axes be logarithmic?
Yes, when both axes use positive numeric values. Turn on Log scale in Customize > Vertical axis and Customize > Horizontal axis. A scatter chart is generally the clearest choice for two numerical variables.
Can a log graph include zero?
No. Zero and negative values cannot be displayed on a standard logarithmic axis. Do not replace them with arbitrary small positive numbers; choose a linear chart or explain any data exclusions instead.
Does Google Sheets change my source data when I enable Log scale?
No. It changes the chart’s axis display, not the stored values. Your cells retain their original measurements.
Why does the chart show no points after I enable Log scale?
First check for zeros, negative values, and numbers stored as text in the selected axis. Also make sure you set the scale on the axis that contains the data you intended to transform visually.
Should I use a log scale for every dataset with large numbers?
No. Use one when ratios or changes across orders of magnitude are important. If absolute differences are the main point, or the values cover a narrow range, a linear scale may be clearer.
Related
- Clear the To Field Cache in Outlook: Step-by-Step Guide
- Clear Calendar Cache in New Outlook: Step-by-Step
- Clear Email Address Cache in Outlook: Step-by-Step
Try it: the Percentage Formula Generator: percent of, percent change, increase and decrease, with the formula.
More in Charts & pivot tables
- Butter Bars in Excel: Create a Butterfly ChartTo format butter bars in Excel, create a mirrored bar chart: plot one group’s values as negatives and…
- Chart Labels in Google Sheets: Add, Edit, and FormatTo add chart labels in Google Sheets, open the chart, choose Customize in the Chart editor, then use…
- Excel Pie Chart: Exclude Zero Values and Empty SlicesExcel pie charts automatically omit zero values as slices, so you usually do not need to change a…
- Pivot Chart: Group Dates by Month in ExcelYes. In Excel for Microsoft 365 on Windows, group dates for a PivotChart through its underlying PivotTable: right-click…
- Gauge Chart in Excel: Build and Format OneTo make a gauge chart in Excel for Microsoft 365 on Windows, create a doughnut chart from three…
- Google Sheets Chart Series Name: Meaning and FixesIn Google Sheets, a chart series name is the label that identifies one set of plotted values, usually…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.