Power Regression Calculator (y = a x^b)
Enter your (x, y) data points and fit a power model y = a x^b by least squares. Shows the coefficient a, exponent b, R squared and correlation, a scatter plot with the fitted curve, and a table of predictions and residuals.
Input
Enter one (x, y) pair per line. The tool fits a power regression y = a x^b by least squares (both x and y must be positive).
One pair per line. Separate values with a comma, spaces, or a tab.
Result
Regression equation
y = 1.9924 x^1.5023
Coefficient a
1.992432
Exponent b
1.502333
R squared
1
Correlation r
1
Number of points
6
Scatter plot and fitted curve
Data points and predictions
| x | y (observed) | Predicted | Residual |
|---|---|---|---|
| 1 | 2 | 1.9924 | 0.0076 |
| 2 | 5.6 | 5.6446 | -0.0446 |
| 3 | 10.4 | 10.3796 | 0.0204 |
| 4 | 16 | 15.9911 | 0.0089 |
| 5 | 22.4 | 22.3599 | 0.0401 |
| 6 | 29.4 | 29.4053 | -0.0053 |
How it works
- The power model is y = a x^b. Taking the natural log of both sides gives ln(y) = ln(a) + b ln(x), which turns the problem into a straight-line fit (simple linear regression) in X = ln(x) and Y = ln(y).
- Least squares is applied to the transformed (X, Y) pairs to find the slope b and intercept ln(a), then a = exp(intercept) recovers the original coefficient. Every x and y must be positive because logarithms are used.
- The R squared and correlation are computed on the original scale, comparing the observed y with the predicted yhat = a x^b rather than the transformed values. An R squared near 1 indicates a good fit.
- Enter one (x, y) pair per line. Values may be separated by a comma, spaces, or a tab, and blank lines are ignored.
- If x is constant, so that ln(x) is the same for every point, the slope cannot be determined and the fit is not possible. At least two points are required.
Reviews
Tell us what you think of this calculator.
Write a review
- Home
Power Regression Calculator (y = a x^b)