Regression Calculator

Fit a straight-line relationship to paired observations for an estimate. Enter your own values below to see regression slope and check the method behind it.

All calculators

Your inputs

Change the example values to match your situation.

Your result

Let’s work it out.

Fill in your inputs and select Calculate.
Your result and breakdown will appear here.

How this calculator works

Pearson r = covariance numerator ÷ √(sum of squared x deviations × sum of squared y deviations). Ordinary least-squares slope = covariance numerator ÷ sum of squared x deviations.

What is Regression Calculator?

Regression Calculator helps you fit a straight-line relationship to paired observations for an estimate.

The main result is regression slope, with a breakdown of intercept, r squared and regression equation. The formula, example and assumptions below explain how to interpret it.

How to use Regression Calculator

Use the example to get familiar with the form, then enter your own figures. Any rates in the example are illustrative. Check the field labels and units before calculating.

  1. Gather paired values: x, y. Use values from the same situation or reporting period.
  2. Replace the example paired values: x, y with your own value, then complete the other fields. Check the displayed units.
  3. Select Calculate and read regression slope with its result breakdown. Change one input and calculate again to compare a second scenario. Reset restores the original example.
  • Enter paired values: x, y in the format shown by the example. Keep the same separators and row structure.

Regression Calculator: a worked example

With the inputs below, the result is 1.9 (regression slope). Follow the example, then replace these illustrative values with your own.

Example inputs and output
Input or outputExample value
Paired values: x, y1, 2; 2, 4; 3, 5; 4, 8
Regression slope1.9
Intercept0
R squared0.962667
Regression equationy = 1.900000x + 0.000000

Understanding the Regression result

Read regression slope alongside intercept, r squared and regression equation. These describe different parts of the same calculation.

Displayed results use a readable number of decimal places. When checking a result by hand, keep extra precision until the last step. To compare scenarios, change one input at a time and keep the others fixed.

  • Example Intercept: 0
  • Example R squared: 0.962667
  • Example Regression equation: y = 1.900000x + 0.000000

Regression Calculator: assumptions and common mistakes

A useful estimate starts with the right inputs. Check the following assumptions and limits before applying the result to your situation.

  • Check the base value, sample definition and chosen operation. Display rounding should come after the calculation.

For wider guidance, visit NIST statistical handbook. The formula and scope of this specific tool are stated on this page.

Regression Calculator FAQs

What does Regression Calculator calculate?

Regression Calculator helps you fit a straight-line relationship to paired observations for an estimate. Its main output is regression slope.

What inputs do I need for Regression Calculator?

You need paired values: x, y. Use the field labels and units to match your figures to the formula.

Which formula does Regression Calculator use?

Pearson r = covariance numerator ÷ √(sum of squared x deviations × sum of squared y deviations). Ordinary least-squares slope = covariance numerator ÷ sum of squared x deviations.

What is a worked example for Regression Calculator?

Example inputs: Paired values: x, y: 1, 2; 2, 4; 3, 5; 4, 8. The result is 1.9 (regression slope).

How should I enter paired values: x, y?

Enter paired values: x, y in the format shown by the example. Keep the same separators and row structure.

Why might the displayed result be rounded?

The result display limits decimal places to keep numbers readable. Very small values may use scientific notation. Keep extra precision during a manual calculation, then round the final answer for comparison.

How should I read regression slope?

Read regression slope alongside intercept, r squared and regression equation. These describe different parts of the same calculation.

Why might my Regression Calculator result differ from my records?

Check the base value, sample definition and chosen operation. Display rounding should come after the calculation. Differences in entered values, units or rounding can also change the comparison.

Can I compare two scenarios in Regression Calculator?

Yes. Note your first regression slope, change paired values: x, y or another input, and select Calculate again. Editing a field clears the old result so it is not mistaken for a new calculation.

Is Regression Calculator free, and where are my inputs calculated?

This calculator is free to use without signing in. Its formula runs in your browser; calculator inputs are not sent to a calculation API. The inputs reset to the example values when you reset the form or start a fresh page.