Function Problems

Use LINEST in WPS Spreadsheets to Fit Y = a/x + b

Natalie TaylorNatalie Taylor Nov 12, 2026 868 views

Question details

Calculate the coefficient a and intercept b for the equation Y = a/x + b by converting it into a linear regression problem.

Use LINEST in WPS Spreadsheets to Fit Y = a/x + b
Product
WPS Spreadsheets
Device & OS
not provided
Scenario
The user has x and Y data and wants to fit the reciprocal equation Y = a/x + b with the LINEST function.
Observed behavior
The equation appears nonlinear when plotted against x, but it becomes linear when Y is plotted against 1/x.
Before you start

Make sure every x value is nonzero, because 1/x cannot be calculated when x equals 0. Arrange the x values and corresponding Y values in matching rows before creating the transformed values.

Solution 1Recommended

Transform x to 1/x and use LINEST to return a and b

Use this method to fit Y = a/x + b when your data becomes approximately linear after x is converted to its reciprocal.

Rewrite the equation as Y = a(1/x) + b. In this linear form, LINEST returns a as the slope and b as the intercept when the 1/x values are used as the known x-values.

1
Set up the x and Y data

In WPS Spreadsheets, place the original x values in one column, such as A2:A10, and place the matching Y values in B2:B10.

2
Create a reciprocal x column

In C2, enter =1/A2, then drag the fill handle down through the last data row. Column C now contains the transformed independent variable 1/x.

3
Calculate coefficient a

Select an empty cell and enter =INDEX(LINEST(B2:B10,C2:C10,TRUE,TRUE),1,1). The returned slope is coefficient a.

4
Calculate intercept b

Select another empty cell and enter =INDEX(LINEST(B2:B10,C2:C10,TRUE,TRUE),1,2). The returned intercept is b.

5
Write the fitted equation

Substitute the two results into Y = a/x + b. For example, if a is 12 and b is 3, the fitted equation is Y = 12/x + 3.

Transform x to 1/x and use LINEST to return a and b
LINEST result mapping: When LINEST uses 1/x as known_x values, its slope corresponds to a and its intercept corresponds to b.
Fit reciprocal equations with WPS Spreadsheets

Calculate Y = a/x + b coefficients with LINEST in WPS Spreadsheets

WPS Spreadsheets lets you transform x values with a simple reciprocal formula and use LINEST to calculate the slope a and intercept b. You can also create an XY scatter chart to verify whether the transformed data supports a linear model.

  1. 1. Enter your source data: Open WPS Spreadsheets and enter x values in one column and their corresponding Y values in the next column.
  2. 2. Transform the independent variable: Enter =1/A2 in a helper column for the first x value, then fill the formula down for all records.
  3. 3. Return coefficient a: Use =INDEX(LINEST(Y_range,reciprocal_x_range,TRUE,TRUE),1,1) to return the slope.
  4. 4. Return intercept b: Use =INDEX(LINEST(Y_range,reciprocal_x_range,TRUE,TRUE),1,2) to return the intercept.
  5. 5. Validate the fit: Use Insert > Chart > XY (Scatter) to plot Y against the reciprocal x values and inspect the linearity.
Use LINEST to return the a coefficient and b intercept for Y = a/x + b.Create reciprocal values with the formula =1/x directly in a worksheet.Visualize transformed data with an XY scatter chart before estimating values.Open, edit, and save Microsoft Excel XLSX and XLS files with strong format compatibility.
microsoft office alternative - wps office

Frequently Asked Questions

Why can LINEST fit Y = a/x + b even though the equation is nonlinear?

LINEST fits a straight-line relationship. After you transform x into 1/x, the equation becomes Y = a(1/x) + b, which is linear in the transformed variable.

Which LINEST result is a in Y = a/x + b?

When the known_x range contains 1/x values, the LINEST slope is a. You can return it with =INDEX(LINEST(Y_range,reciprocal_x_range,TRUE,TRUE),1,1).

How do I return b from LINEST in WPS Spreadsheets?

Use =INDEX(LINEST(Y_range,reciprocal_x_range,TRUE,TRUE),1,2). This returns the intercept b for the fitted equation.

Can I use x values equal to zero in this regression?

No. The transformation 1/x is undefined when x is zero. Remove, correct, or separately handle zero x values before using LINEST.

Should I use the fitted equation to predict values outside my data range?

Use extrapolation cautiously. Check an XY scatter chart of Y against 1/x first, and avoid predictions near x = 0 because reciprocal values change very rapidly there.