How to use the Log-Log Graph Maker
- Paste two columns (X, then Y) or upload a CSV file. Both columns must be above zero.
- Keep the chart type on "Scatter".
- Under Axes tick both "Log X" and "Log Y".
- Under Trendline choose "Power" to get y = a·x^b, and read the exponent b.
- Download the graph as SVG, PDF or PNG.
What makes a graph log-log
On a log-log graph both axes use a logarithmic scale. Every step along either axis means multiplying by a fixed factor, so the graph can show values from 0.01 to 10,000 on one page and still keep every point readable. The two scales together have a special property: a power law y = a·x^b has the logarithm log y = log a + b·log x, which is a straight line with slope b.
That is why log-log plots are the standard tool for scaling laws. The slope tells you how Y scales with X: a slope of 1 means proportional, 2 means Y grows with the square of X, 0.5 means the square root, and a negative slope means Y falls as X grows.
Worked example: how metabolic rate scales with body mass
The sample data follow the pattern behind Kleiber’s law, the observation that an animal’s resting metabolic rate scales roughly with body mass to the power 0.75. The values here are illustrative, not measured. Body mass runs from 20 g to 250 kg, a range of more than four orders of magnitude. On a linear graph the small animals would be squashed into the corner; on log-log axes every point is visible and they line up.
Reading the slope from the first and last points: log₁₀(212 / 0.18) / log₁₀(250 / 0.02) = 3.07 / 4.10 = 0.75. The power trendline estimates the same exponent from all seven points and prints the equation y = a·x^b. An exponent below 1 means larger animals use less energy per kilogram, which matches what biologists see.
| Body mass (kg) | Metabolic rate (W) |
|---|---|
| 0.02 | 0.18 |
| 0.1 | 0.62 |
| 0.5 | 2.0 |
| 2 | 5.8 |
| 10 | 18.9 |
| 50 | 64.5 |
| 250 | 212 |
Illustrative values following a ¾-power law.
Where log-log plots are used
Beyond biology, log-log graphs appear wherever quantities span many orders of magnitude or follow power laws. Examples: the frequency response of a filter or amplifier (gain against frequency), drag force against speed, earthquake frequency against magnitude, word frequency against rank (Zipf’s law), the period of a planet’s orbit against its distance, and particle size distributions. Engineers read these plots in decades: the gain falling by a fixed amount per decade of frequency is a straight line of fixed slope.
Is it really a power law?
A straight line on log-log axes is necessary evidence, but be careful. Many other curves look straight over a narrow range, and an exponential curve can look nearly straight over one decade. A fit over less than about two decades of X cannot reliably separate a power law from alternatives. Check that the points stay on the line across the whole range, and look at the residuals around the fit instead of trusting R² alone.
If the points curve upwards or downwards on a log-log plot, the exponent is changing, which means there is a transition between two regimes. If instead the points are straight on a log Y axis with a linear X axis, you have exponential behaviour, and the semi-log graph maker is the right page.
Common mistakes
Zero and negative values cannot be plotted on either axis, so they are skipped; remove them or use a different transformation. Do not measure the slope with a ruler on the screen unless both axes have equal decade lengths, because the apparent slope changes with the figure shape; use the fitted exponent instead. Report which logarithm you used when quoting slopes, and always keep the decade tick labels on both axes so the reader can see the scale. The log scale guide has a table comparing linear, semi-log and log-log plots.
Frequently asked questions
- How do I make a log-log graph?
- Plot X and Y, then tick both “Log X” and “Log Y” under Axes. Both axes switch to logarithmic scales with decade ticks. Add a power trendline to get the exponent.
- What does the slope of a log-log graph mean?
- For a power law y = a·x^b, the slope is the exponent b. A slope of 2 means Y is proportional to X squared; a slope of −1 means Y is inversely proportional to X.
- What is the difference between semi-log and log-log?
- Semi-log has one logarithmic axis (usually Y) and shows exponential behaviour as a straight line. Log-log has two logarithmic axes and shows power laws as straight lines.
- Can I plot negative numbers on a log-log graph?
- No. Logarithms are only defined for positive numbers, so zero and negative values are skipped.
- Is my data private?
- No. Your data never leaves your browser. Plotiq parses and plots files locally with JavaScript, so nothing is uploaded to a server.
Last updated: · by Dev Patel ·Read our guides