How to Do Regression Analysis

Cody Schneider••7 min read

Wondering if your increased ad spend is actually driving more sales, or if it was just a good month? Regression analysis is the tool that helps you move from gut feelings to data-backed answers by showing you the statistical relationship between different parts of your business. This article will break down how to perform a regression analysis using a tool you already know, so you can start making smarter, data-informed decisions.

GraphedGraphed

Build AI Agents for Marketing

Build virtual employees that run your go to market. Connect your data sources, deploy autonomous agents, and grow your company.

Watch Graphed demo video

What Exactly Is Regression Analysis?

At its core, regression analysis is a statistical method for understanding the relationship between two or more variables. Think of it like a cause-and-effect detector for your business data. You use it to see how changes in one variable (your "cause") can be linked to changes in another variable (your "effect").

To make this concrete, let's use a non-business example: outdoor temperature and your electricity bill. As the temperature outside goes up, chances are your electricity bill does too, because you're running the air conditioner. Regression analysis can quantify that relationship and tell you: "For every one-degree increase in temperature, your electricity bill tends to increase by $2.50."

In the world of business, we just swap out the variables:

  • Dependent Variable: This is the main outcome you want to measure or predict. It's the "effect." In business, this is often Revenue, Sales, Conversions, or Website Sessions.
  • Independent Variable(s): These are the factors you think are influencing your dependent variable. They are the "causes." Examples include Ad Spend, Number of Sales Calls, Email Subscribers, or Website Traffic.

If you're only using one independent variable to predict the outcome (like Ad Spend predicting Sales), it's called a simple regression. If you're using multiple independent variables (like Ad Spend, Website Traffic, and Email Subscribers to predict Sales), it's called a multiple regression.

Free PDF · the crash course

AI Agents for Marketing Crash Course

Learn how to deploy AI marketing agents across your go-to-market — the best tools, prompts, and workflows to turn your data into autonomous execution without writing code.

Why Business Owners and Marketers Should Care

So, why go through the trouble? Because regression analysis helps you answer critical business questions and move beyond simple vanity metrics. It helps you:

  • Prove ROI: Go from "we spent $10,000 on ads and got 100 sales" to "for every additional $1 we spent on ads, we generated $4.50 in revenue." This proves the direct impact of your efforts.
  • Forecast the Future: If you know the relationship between your marketing efforts and your results, you can make much more accurate forecasts. "If we increase our sales team's call volume by 15%, we can predict a 7% increase in new deals."
  • Optimize Your Strategy: By running a multiple regression, you can discover which of your channels or efforts has the biggest impact. Is it your blog content, your Facebook ads, or your sales outreach that truly moves the needle on revenue? Regression points you to your most powerful lever.
  • Isolate Key Drivers: Find out which factors genuinely influence customer satisfaction, lead conversion rates, or employee performance, allowing you to focus your resources where they count.

How to Do Regression Analysis in Google Sheets

You don't need a PhD in statistics or expensive software to perform a basic regression analysis. You can do it for free in Google Sheets, a tool you likely use every day. Here’s a step-by-step guide.

Step 1: Prepare Your Data

Your first step is to get your data into a clean, simple format. You need at least two columns: one for your independent variable (the cause) and one for your dependent variable (the effect).

Let's say you want to see the relationship between your weekly Facebook Ad Spend and your weekly Shopify Sales. Your sheet should look something like this, with each row representing the same time period (e.g., a week).

Step 2: Install the XLMiner Analysis ToolPak Add-on

Google Sheets doesn't have a built-in regression function, but you can add it for free in seconds.

  1. Click on Extensions > Add-ons > Get add-ons.
  2. In the search bar, type "XLMiner Analysis ToolPak" and press Enter.
  3. Click on the tool and follow the prompts to install it. You'll need to grant it permission to access your Google account.

Step 3: Run the Regression Analysis

Once the add-on is installed, you're ready to run the numbers.

  1. In your Google Sheet, click Extensions > XLMiner Analysis ToolPak > Start.
  2. A sidebar will appear on the right. Scroll through the options and click on Regression.
  3. A dialog box will pop up. Now you just have to tell it where your data is:
GraphedGraphed

Build AI Agents for Marketing

Build virtual employees that run your go to market. Connect your data sources, deploy autonomous agents, and grow your company.

Watch Graphed demo video

Step 4: Read and Understand the Output

After a moment, XLMiner will generate a table of results. It might look intimidating, but you only need to focus on a few key numbers to get actionable insights.

R Square (or Adjusted R Square)

What it is: R Square, or R², tells you how much of the change in your dependent variable (Sales) can be explained by your independent variable (Ad Spend). It’s shown as a decimal between 0 and 1.

How to interpret it: An R Square of 0 means your model explains nothing, while an R Square of 1 means it explains everything. For example, an R Square of 0.82 means that 82% of the variation in your Shopify Sales can be explained by changes in your Ad Spend. That's a strong relationship!

P-value

What it is: The P-value tests the statistical significance of your results. In simple terms, it helps you determine if your findings are a real pattern or just random chance.

How to interpret it: The golden rule in most business analysis is: if the p-value is less than 0.05, the relationship is considered statistically significant (i.e., it's very unlikely to be a random fluke). You'll see a P-value for each of your independent variables.

Coefficients

What it is: This is arguably the most important number for business decision-making. The coefficient tells you the exact relationship between your variables.

How to interpret it: The coefficient next to your independent variable (e.g., "Ad Spend ($)") tells you how much your dependent variable is expected to increase for every one-unit increase in your independent variable. If the coefficient for Ad Spend is 3.4, it means that for every additional $1 you spend on ads, you can expect Shopify Sales to increase by $3.40.

Free PDF · the crash course

AI Agents for Marketing Crash Course

Learn how to deploy AI marketing agents across your go-to-market — the best tools, prompts, and workflows to turn your data into autonomous execution without writing code.

Putting It All Together: A Simple Example

Let's say we ran the analysis on our Ad Spend and Shopify Sales data, and our output included these key numbers:

  • R Square: 0.85
  • P-value for Ad Spend: 0.002
  • Coefficient for Ad Spend: 3.4

Our interpretation would be:

"Our ad spend is a strong and reliable predictor of our sales. The model shows that changes in ad spend explain about 85% of the variation in our weekly Shopify sales (R Square = 0.85). This relationship is statistically significant, so we can be confident it's not a coincidence (P-value = 0.002). Most importantly, we found that for every additional $1 invested in ads, we can expect to generate $3.40 in sales (Coefficient = 3.4)."

Now that's an insight you can take to your next budget meeting!

Things to Keep in Mind

Regression is powerful, but it's not magic. Here are a couple of common pitfalls to be aware of.

  • Correlation Is Not Causation: Regression shows that two variables move together, but it can't prove that one causes the other beyond a shadow of a doubt. There could always be a third, unmeasured variable at play. Use your business judgment to supplement the numbers.
  • Garbage In, Garbage Out: The quality of your analysis depends entirely on the quality of your data. If your data is messy, incomplete, or inaccurate, your regression results will be meaningless. Ensure your data is clean before you begin.

Final Thoughts

Regression analysis gives you a powerful way to look beneath the surface of your data, helping you understand the real drivers of your business performance. By quantifying the relationship between your efforts and your outcomes, you can optimize your strategy, prove your value, and make far more accurate plans for the future.

Spending half your morning gathering data and fumbling with spreadsheet add-ons is a common frustration. That's why we invented Graphed. Instead of manually pulling CSVs and setting up analyses, you can connect your data sources once and then just ask in plain English: "Show me the relationship between my Facebook Ad spend and Shopify revenue." Graphed does the heavy lifting for you, instantly building live dashboards so you can spend your time on insights, not manual data wrangling.

Related Articles