How to Make a Year Over Year Graph in Excel

Cody Schneider8 min read

Comparing your performance this year to last year is one of the most fundamental ways to understand your business's growth. A year-over-year (YoY) graph quickly shows you if you’re heading in the right direction, highlights seasonal trends, and helps you set realistic goals for the future. This guide will walk you through, step-by-step, how to prepare your data and build a clear, insightful year-over-year graph right in Excel.

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 is Year-Over-Year (YoY) Analysis?

Year-over-year analysis is a method of comparing a specific metric from one period against the same period from the previous year. For example, comparing sales from March of this year to sales from March of last year. This approach is powerful because it helps smooth out seasonality - the predictable fluctuations that happen at certain times of the year.

Most businesses have natural rhythms. An e-commerce store might see a spike in sales in November and December, while a landscaping company's revenue peaks in the summer. Comparing November's sales to October's might look like incredible growth, but it's likely just seasonal demand. By comparing November of this year with November of last year, you get a much more accurate picture of your actual performance, stripping away the seasonal noise to see the underlying growth trend.

A YoY graph visualizes this comparison, making it instantly clear whether you're up, down, or flat for each period. It quickly answers questions like:

  • Are our Q4 sales stronger this year than last year?
  • Did our summer marketing campaign generate more website traffic than last year's?
  • Is our customer churn rate in January improving over time?

This clear view helps you make better decisions, spot potential issues before they become major problems, and communicate performance to your team or stakeholders effectively.

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.

Step 1: Get Your Data Ready for Analysis

Before you can create any chart in Excel, your data needs to be organized properly. This is the most important step, a great chart can't fix poorly structured data. For a YoY graph, you need a simple, clean table containing at least two columns: a date column and a metric column (like Revenue, Website Sessions, or New Customers).

Your raw data might look something like this:

While this is a fine start, it’s not yet ideal for building a clean monthly YoY chart. We need to help Excel group the data by month and year. We do that by adding helper columns.

Add "Year" and "Month" Helper Columns

Helper columns break a single piece of data (like a date) down into more useful components. By creating separate columns for the year and the month, we make it much easier to summarize our data later on.

  1. Create the Year Column: In the cell next to your first record (e.g., cell C2), type the heading "Year." In the cell below it, enter the formula =YEAR(A2) assuming your dates are in column A. This formula extracts just the year from the date. Press Enter, and then drag the fill handle (the small square at the bottom-right of the cell) down to apply the formula to all your rows.
  2. Create the Month Column: In the next empty column (e.g., cell D2), type the heading "Month." In the cell below it, use the formula =TEXT(A2, "mmmm") This formula is great because it returns the full name of the month (e.g., "January"), which looks much cleaner on a chart than a number like "1." Drag the fill handle down to copy this formula as well.

For more advanced sorting, you might create an additional month number column using =MONTH(A2). This helps ensure "January" comes before "February" when sorting, as alphabetical sorting can sometimes mix up the order. However, for PivotTables, the month name is usually sufficient.

After adding these columns, your data should look much more robust:

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 2: Summarize Your Data with a PivotTable

Now that your data is properly structured, you need to aggregate it into a summary table that shows total monthly values for each year. While you could do this with complex SUMIFS formulas, the fastest and most flexible way is with a PivotTable.

  1. Click anywhere inside your data table. It is crucial that you have clear headers for each column.
  2. Go to the Insert tab on Excel's ribbon and click PivotTable.
  3. Excel will automatically select your data range. In the dialog box, simply confirm that the selected range is correct and choose to place the PivotTable in a New Worksheet. Click OK.
  4. You'll now see a blank PivotTable on a new sheet and a PivotTable Fields pane on the right side of your screen. This is where you'll build your summary table.
  5. Drag and drop the fields into the areas shown in the pane:

This simple action instantly creates a perfectly structured summary table. It nets out all the daily transactions and groups them by month and year, which is exactly what we need to build our graph.

Step 3: Build Your Year-Over-Year Graph

With your PivotTable prepared, creating the graph is just a matter of a few clicks. The ideal chart types for showing YoY comparisons are either a line chart or a clustered column chart.

  • A line chart is excellent for showing trends and the overall shape of your data across the year.
  • A clustered column chart is great for directly comparing the performance of a single month between years.

Creating a YoY Line Chart

Let's start with a line chart, as it’s often the most popular choice for tracking performance over time.

  1. Click anywhere inside your newly created PivotTable.
  2. Go to the PivotTable Analyze tab (or just the Insert tab).
  3. Click on PivotChart. A dialog box will appear.
  4. Select Line from the chart options on the left. Choose the first standard line chart option (the one with markers is also a good choice).
  5. Click OK.

Excel will instantly generate a line chart based on your PivotTable data. You'll have one line for each year, with the months displayed along the horizontal (X) axis and the values (e.g., Revenue) along the vertical (Y) axis. You've successfully created a YoY graph!

Step 4: Customize and Refine Your Chart

A default chart from Excel gets the job done, but taking a few minutes to clean it up makes it far more professional and easier to read.

Add a Descriptive Title

The first thing to change is the generic title. Click on the chart title and replace it with something specific and clear. Instead of "Total," use something like "2022 vs. 2023 Monthly Revenue" or "Year-Over-Year Website Traffic Comparison."

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.

Clean Up Buttons and Labels

PivotCharts come with gray "field buttons" on the chart itself. These are useful for filtering but can clutter the final visual. To remove them:

  • Right-click on one of the field buttons on the chart.
  • Select "Hide all field buttons on chart" from the menu.

Customize Axes and the Legend

Ensure your chart is easy to interpret:

  • Axis Titles: Give your Y-axis a clear title (like "Total Revenue ($)" or "Number of Sessions"). To do this, click the chart, click the green "+" icon that appears on the right, and check the box for "Axis Titles." Then, edit the new text box that appears.
  • Legend: The legend should already be clear (e.g., showing "2022" and "2023"), but you can click on it to move it to a different position (top, bottom, right, or left) if needed.
  • Data Labels: For certain charts, you might want to add data labels to show the exact values for each point. Be careful with this on a line chart, as it can quickly become cluttered. Use it selectively for key points if necessary.

Choose Your Colors

Finally, under the Chart Design tab, you can easily change the color palette to match your company's branding or to create better contrast between the lines. Choosing distinct colors for each year makes the chart even easier to read at a glance.

Final Thoughts

Building a year-over-year graph in Excel becomes simple once you master two core steps: structuring your data with helper columns and summarizing it with a PivotTable. This process turns rows of raw data into a powerful visual tool for tracking performance, identifying trends, and making informed business decisions.

Getting insights shouldn’t feel like a chore. That recurring Monday morning task of downloading CSVs, cleaning them up, and rebuilding the same charts over and over is exactly the repetitive work we built Graphed to eliminate. We connect directly to your tools like Google Analytics, Shopify, and Salesforce, so your data is always live and in one place. Instead of spending hours in spreadsheets, you can create a real-time YoY dashboard by just asking, "Show me a line chart of monthly revenue in 2022 vs. 2023," and get back to using your data instead of just fighting with it.

Related Articles