top of page
Search

US DEBT Analysis (Excel)

Feb 19, 2025
10 min read

Updated: Mar 5, 2025

In this Excel Data Analysis project, I will analyze the United States debt to answer key questions from the stakeholder.



U.S. Debt Analysis Project in Excel

Scenario:

We were hired by a small debt agency in Washington, D.C., specializing in analyzing and forecasting public and private debt. The U.S. government has requested an analysis of public and governmental debt to answer specific questions. Using the provided Questions and Data Dictionary, we will analyze the data using charts, graphs, and narratives.

Key Questions:

  1. What was the Yearly Debt Percentage Increase for each year compared to the previous year?

  2. Which months historically have seen the highest/lowest increases in Total Debt?

  3. What is the projected growth of the publicly held debt in the next few years?

Data Dictionary:

  • Debt Held by the Public: Debt held by individuals, corporations, foreign governments, and other entities outside the U.S. government.

  • Intragovernmental Holdings: Debt held by U.S. government agencies.

  • Total Public Debt Outstanding: The sum of Debt Held by the Public and Intragovernmental Holdings.


Answers & Breakdown – U.S. Debt Analysis Project

What you're seeing above is our raw data here is how I will clean the data:
What you're seeing above is our raw data here is how I will clean the data:

Cleaning the Raw Data

  1. Duplicate the Raw Data:

    • Create a new sheet named "Cleaned Data" and copy all data from the raw data sheet.

    • This ensures we keep the original data intact in case we need to reference or revert any changes.


  2. Begin Cleaning the Data:

    • Remove any unnecessary columns that are not relevant to our analysis.

    • Check for and handle missing values (fill, remove, or interpolate as needed).

    • Ensure date formats are consistent and properly recognized in Excel.

    • Standardize numerical values (e.g., remove extra spaces, convert text-formatted numbers to numeric).

    • Remove or correct any duplicate rows to prevent data inconsistencies.


  3. Transpose the Data (Make It Vertical Instead of Horizontal)

    • Select all data using Ctrl + Shift + Down + Right.

    • Copy the data using Ctrl + C.

    • Right-click on a new area or sheet and choose "Transpose" to flip the data.

    • This makes the data easier to read and visualize.


  4. Change Scientific Notation to Full Numbers

    • Select the column(s) with numbers in scientific notation.

    • Go to the Home tab in Excel.

    • Click on the number format dropdown (where it says "Scientific").

    • Select "Number" to display full numeric values.

By cleaning the data, we ensure that our analysis is based on accurate, structured, and error-free information. 


Step-by-Step Process for Answering Question 1

Question: What was the Yearly Debt Percentage Increase for each year compared to the previous year?



Step 1: Apply a Filter to the Data

  1. Add a Filter to your dataset:

    • Select your entire data range and go to the Data tab.

    • Click Filter to enable filtering for each column.

  2. Filter the Record Date Column:

    • Click the dropdown in the Record Date column.

    • Select the last day of each year (December 30 or December 31) from 2015 to 2022.

      • Note: The last day of data for 2022 will be the one recorded as of February 15, 2023.

      • Filter to select these specific dates.

Step 2: Analyze the Filtered Data

  • After filtering, your dataset should now only include the last day of each year and the data for February 15, 2023.

  • The dataset should be smaller and focus only on the end-of-year data for each year.

Step 3: Calculate Yearly Debt Percentage Increase

  • Now that the data only includes the end-of-year data points, calculate the Yearly Debt Percentage Increase as described earlier: Percentage Increase= (Debt in Current Year − Debt in Previous Year) Divided by Debt in Previous Year Then Multiply that by 100

  • For each year, calculate the debt increase compared to the previous year using the filtered data.

Step 4: Final Adjustments & Visualizations

  • Visualize the Results:

    • Use a line chart or bar graph to show the yearly percentage increase.

    • Label the axes appropriately and add data labels if necessary.


By filtering for only the last day of each year and the specific date of February 15, 2023, we can clearly see the year-over-year percentage changes in the debt. The filtered data makes the analysis more accurate and easier to interpret.

Your filtered data should now look like this:

What We Have:

  • We have the final day of each year recorded, which gives us the debt held by the public, intragovernmental holdings, and total public debt outstanding for each year.

  • This data allows us to calculate the yearly debt percentage increase for each year compared to the previous year.

Calculation Method:

To calculate the Yearly Debt Percentage Increase for Debt Held by the Public, we use the following formula: Percentage Increase= (Debt in Current Year − Debt in Previous Year) Divided by Debt in Previous Year Then Multiply that by 100


Step 1: Apply the Formula

  1. Identify the Data Columns:

    • Column B contains the values for Debt Held by the Public.

  2. Use the Formula to calculate the yearly debt increase:

    • In cell E2 (next to the first year’s data), use this formula to calculate the percentage increase:

      = (B2 - B33) / B33 * 100

    • Replace B2 with the current year's debt value and B33 with the previous year’s debt value.

Step 2: Examine Calculation

  • The result should be a float number like 0.469459, representing the yearly debt percentage increase that shows up in cell E2.

  •  Double click the + to drag formula down into the rest of the column.


Your graph should look like this after you drag down the formula into the rest of the column
Your graph should look like this after you drag down the formula into the rest of the column

Step-by-Step Process for Finalizing and Organizing the Data

Step 1: Delete Invalid Data

  • Delete the value 1.8413 since there is no corresponding year under 12/31/2015, which makes it an invalid entry for percentage increase.

    • Simply select the cell with 1.8413 and press Delete.

Step 2: Drag Over Data from Column E to Column G

  • Drag the values from column E into column G:

    • Select the data in column E (the debt percentage increase values).

    • Drag the data horizontally over to column G to copy it into the new column.

Step 3: Name the Columns

After transferring the data, we will name each column to make it more meaningful:

  • Column E: Name it "Debt Held by the Public Percentage Increase per Year".

  • Column F: Name it "Intragovernmental Holding Percentage Increase per Year".

  • Column G: Name it "Total Public Debt Outstanding Percentage Increase per Year".

Step 4: Copy and Paste the Data to New Location

  • Select the data from columns E to G.

  • Cut the selected data:

    • Use Ctrl + X or right-click and choose Cut.

  • Go to cell B7506 on your Excel sheet and paste the data:

    • Press Ctrl + V or right-click and choose Paste to place the data at B7506.

Step 5: Visualize the Data Separately

  • Now that the data is placed at B7506, you can start visualizing it separately or create charts/graphs as needed.

  • You can also filter or manipulate this new section without affecting the original dataset.



This will give us the yearly debt percentage increase for the Intragovernmental Holdings and Total Public Debt Outstanding. After we do that we will see the increase/decrease from the year prior in a decimal percentage.
This will give us the yearly debt percentage increase for the Intragovernmental Holdings and Total Public Debt Outstanding. After we do that we will see the increase/decrease from the year prior in a decimal percentage.


This is how your data should look at this point in our tutorial.
This is how your data should look at this point in our tutorial.


Step 1: Insert the Year Formula

  • In cell A7506, type the following formula: = YEAR(A2)

    This formula will extract the year from the date in cell A2. If your dates are located in a different column, make sure to adjust the reference (e.g., A2 to the correct cell containing the date).

Step 2: Apply the Formula

  • Press Enter, and the year should appear in cell A7506.

Step 3: Fill the Years Down the Column

  • To fill the rest of the rows with the corresponding years:

    • Hover over the small square (dark + sign) at the bottom right corner of cell A7506.

    • Double-click the square, and Excel will automatically fill the year for the entire column, based on the date values in the adjacent rows.




Now we will create a line chart with our data here's how we will do it:


Step-by-Step Process for Creating and Sorting the Line Chart

Step 1: Select the Data

  1. Select all the columns and rows within your new dataset (including the years, percentage increases, and the labels).

Step 2: Insert the Line Chart

  1. Go to the Insert tab at the top of Excel.

  2. Click on Recommended Charts.

  3. In the chart options, select the Line Chart (this will display trends over time) and click OK.

Step 3: Name the Line Chart

  1. Once your line chart is inserted, click on the chart title to select it.

  2. Rename the chart to something meaningful, such as "Yearly Debt Percentage Increase Trend" or a similar descriptive title.

Step 4: Sort the Data

  1. Right-click anywhere on the chart.

  2. Select Sort from the context menu.

  3. Choose Sort from Smallest to Largest to organize the years in the correct order on the chart.

    • This will ensure that the chart visualizes the data in chronological order from the earliest year to the latest.






Now change the float numbers to percentage, in your new dataset from your home tab. Now you will be able to see the Yearly Debt Percentage Increase for each year compared to the previous year.



First, name the current sheet "Answer 1". Then, create new sheets for Answer 2, Answer 3, and another sheet called "Final Outputs." Next, go to the Final Outputs sheet and copy the line chart you created in Answer 1. Paste the chart into the Final Outputs sheet and provide an explanation of your findings from the chart. I decided to design my chart to make it look more visually appealing for my client, but you can leave it as it is if you'd like.
First, name the current sheet "Answer 1". Then, create new sheets for Answer 2, Answer 3, and another sheet called "Final Outputs." Next, go to the Final Outputs sheet and copy the line chart you created in Answer 1. Paste the chart into the Final Outputs sheet and provide an explanation of your findings from the chart. I decided to design my chart to make it look more visually appealing for my client, but you can leave it as it is if you'd like.

For Answer 1, I discussed my findings from the graph, stating that from 2016 to 2019, the Total Public Debt Outstanding had an average increase of about 5%. In 2020, however, there was a significant spike, which you attribute to the pandemic responses in the United States. This analysis highlights the impact of unusual circumstances, like the pandemic, on national debt.





Now we will answer Question number 2.

Which months historically have seen the highest/lowest increases in Total debt?


To answer Question 2, follow these steps:

  1. Go to the sheet named "Answered Two".

  2. Copy your cleaned data from the "Cleaned Data" sheet and paste it into the Answered Two sheet.

Once the data is pasted, you can proceed with the analysis of which months have historically seen the highest and lowest increases in the Total Debt Outstanding.

Step-by-Step Process for Analyzing Monthly Debt Increases (Question 2)

Step 1: Group Data by Month and Calculate the Average

  1. Insert a Pivot Table:

    • Go to the "Answered Two" sheet.

    • Highlight your cleaned data.

    • Go to the Insert tab and select PivotTable.

  2. Set Up Pivot Table:

    • In the PivotTable Fields, drag "Months (Record Date)" to the Columns section.

    • Drag "Total Public Debt Outstanding" to the Values section.

  3. Change Value to Average:

    • If the value isn't already set to Average, click on the drop-down in the Values section, select Value Field Settings, and choose Average.

Step 2: Create a Pivot Chart

  1. Insert a Pivot Chart:

    • Go to the PivotTable Analyze tab.

    • Click on Pivot Chart.

    • Choose the Clustered Column Chart option to visualize the data clearly.

Step 3: Name and Design the Chart

  1. Name the Chart:

    • Click on the chart title and change it to "Monthly Average Total Debts".

  2. Design the Chart:

    • Feel free to design the chart however you like, but make sure it’s easy to read and visually appealing for your stakeholders. You can adjust colors, axis labels, and chart styles to enhance clarity.

Step 4: Copy the Chart to the Final Outputs Sheet

  1. Copy the Chart:

    • Right-click on the chart and select Copy.

  2. Paste the Chart in the "Final Outputs" Sheet:

    • Go to the "Final Outputs" sheet and paste the chart.

Step 5: Analyze and Discuss the Findings

  1. Discuss Your Findings:

    • In the Final Outputs sheet, provide a summary of your findings. For example, you might observe trends like which months historically show the highest or lowest increases in the Total Public Debt Outstanding.

    • You can discuss any seasonal trends, spikes, or significant changes that might require further analysis or action.





For Answer 2, I summarized my findings as follows:

The highest debt increases usually happen in January, February, November, and December. The lowest increases are typically seen in April, May, June, and July. Hypothesis: People tend to spend more during the high months because of holidays like Thanksgiving, Christmas, New Year's, and Valentine's Day. These holidays encourage spending on gifts and celebrations, often using debt. In the low months, there are fewer major holidays, so people tend to use less debt.




Now we will Answer question 3:

Which months historically have seen the highest/lowest increases in Total debt?


Step-by-Step Process for Answering Question 3

Step 1: Go to the "Answer 3" Sheet

  1. Open the "Answer 3" sheet where we will create the pivot table.

Step 2: Insert a Pivot Table

  1. Select the cleaned data from the sheet where your data is located.

  2. Go to the Insert tab and click PivotTable.

  3. Ensure the pivot table is placed in the "Answer 3" sheet.

Step 3: Set Up the Pivot Table

  1. In the PivotTable Fields pane:

    • Drag "Debt Held by Public" to the Values section.

  2. Adjust the Value Field Settings:

    • Right-click on the "Debt Held by Public" in the Values section.

    • Select "Value Field Settings" and set it to "Max" (to display the maximum debt held by the public for each month).

  3. Change the Number Format:

    • Click on Number Format, select "Number", and set the decimal places to 0.

  4. Drag "Years (Record Date)" to the Rows Section:

    • Drag the "Years (Record Date)" field to the Rows section to display the data organized by year.



Step-by-Step Process for Answering Question 3 (Forecasting Future Debt Increases)

Step 5: Copy and Paste Pivot Table Data

  1. Select all the data inside the pivot table.

  2. Paste it into cell E4.

  3. Convert the pasted data to Number Format (since it defaults to "General" when pasted).

Step 6: Clean the Data

  1. Delete rows for years 1993 - 1996, as no data exists for these years.

  2. Add new rows for future years 2024, 2025, 2026, and 2027 at the bottom.

Step 7: Use FORECAST to Predict Future Debt

  1. In column F, use the FORECAST.ETS function to predict the debt for future years.

  2. In cell F34 (corresponding to 2023), enter the formula:

    excel

    CopyEdit

    =FORECAST.ETS(E34, $F$8:$F$33, $E$8:$E$33)

  3. Drag down the formula to fill in the forecasted values for 2024, 2025, 2026, and 2027.

Step 8: Insert a Stacked Area Chart

  1. Select the data in columns E and F.

  2. Go to the Insert tab and choose Stacked Area Chart.

  3. Name the chart appropriately (e.g., "Forecasted Debt Increase Over Time").

Step 9: Finalize and Add to Final Output Sheet

  1. Copy the chart and paste it into the "Final Outputs" sheet.

  2. Write a summary discussing your findings:

    • Highlight the trend in debt increases over the years.

    • Explain how the forecasted values provide insight into future debt growth.

    • Discuss any patterns or anomalies observed in the forecast.

Findings and Significance

From 1997 to 2007, publicly held debt increased by approximately $1 trillion. However, from 2008 to 2019, debt surged dramatically from $6 trillion to $17 trillion, reflecting the financial crisis of 2008 and subsequent government stimulus measures.

Between 2020 and 2022, publicly held debt rose further from $21.5 trillion to $25 trillion, likely driven by pandemic-related spending. Looking ahead, projections indicate that by 2027, publicly held debt could reach $33 trillion, continuing its steady upward trend.

Conclusion

Publicly held debt is on a path of continuous growth, with no signs of slowing down. Over the next five years, debt is expected to rise at a steady rate, which could have significant economic implications for interest rates, inflation, and government spending. This analysis provides valuable insights into past trends and future debt projections, helping policymakers and financial analysts prepare for potential economic shifts.


This concludes our Excel Data Analysis Project, where we examined United States debt trends to answer key stakeholder questions. Through data cleaning, visualization, and forecasting, we uncovered valuable insights into debt growth patterns. Hope you found this analysis both informative and engaging!





 
 
 

1 Comment


dharber583
Jan 20

Nice work merrill

Like
vvffg_5_edited_edited.png

Data analytics professional with a recent BBA in Business Economics. Proficient in data analysis platforms including MySQL, Google Spreadsheets, Excel, Tableau, Python, R, Pandas, Azure, AWS, Big Query, Econometrics, and data visualization. Adept at extracting actionable insights and presenting data-driven recommendations to stakeholders. Eager to leverage technical skills and academic knowledge to drive impactful business decisions.

•    SQL (MySQL, PostgreSQL, Big Query)   
•    Tableau (Advanced Data Preparation, Creating Dashboards, Data Cleaning)
•    Python (Pandas, NumPy, Matplotlib, Seaborn)    
•    Excel (VLOOKUP, Pivot Tables, Conditional Formatting, Automation)    
•    Microsoft Power BI      
•    Google Spreadsheets
•    Aws
•    Azure           
•    Econometrics
•    Microsoft Office: Proficient in Outlook, Word, Excel, PowerPoint Microsoft Navision
•    Knowledge: Educated in Economic Concepts, Financial Analytical Skills

 

Education:

Bachelor of Business Administration, Business Economics at Georgia State University      

- (3.5 GPA): Data Collection & Analysis, Data Structures & Algorithms, Economic Research

 

Certifications:
•    Analyst Builder for Data Analyst Certification: (Advanced MySQL for Data Analysis, Pandas, Python, Tableau)
•    Google Data Analytics Certification: (Advanced Excel for Automation, R, Big Query) 
•    Market Research Foundations (Market Research Program)

  • GitHub
  • LinkedIn
bottom of page