Microsoft 365 Copilot Chat just made complex calculations and data analysis easier than ever before, thanks to the integration of a powerful Python code interpreter. With this feature, users can run advanced math operations and leverage real-time web lookups to analyze data for everyday decisions. Whether you're making financial calculations or trying to analyze historical data, Copilot Chat is here to help. 

Scenario 1: Calculate Your Stock Market Profit (Real-Time Data Lookup) 

Note: This feature is available for customers with a Microsoft 365 Copilot for Business subscription.

Let’s say you’ve always wondered how much profit you would’ve made if you had bought a specific stock years ago. With the new Python interpreter, you can now find out easily. 

For example, to calculate the potential profit from purchasing 1000 shares of Microsoft stock on June 6th, 2016, and selling them on January 12th, 2025, simply type the following into Microsoft 365 Copilot Chat: 

"If I bought 1000 shares of Microsoft stock on June 6th, 2016, how much profit would I have made if I sold them on January 12th, 2025? Calculate the profits in a table format and create an excel spreadsheet with the results." 

Copilot Chat will pull the historical stock price data from the web, calculate the profit based on current market values, and give you a precise result, including the return on investment (ROI). This is a game-changer for anyone interested in tracking their investments or doing financial planning without having to jump between different websites or tools. 

An Excel spreadsheet showing the results of using Python Code Interpreter to calculate profits.

How it works

  1. Open Microsoft 365 Copilot Chat.

  2. Enter your query in natural language.

  3. Copilot will automatically pull the required public data (in this case, stock prices) from the web and use Python to perform the calculation.

  4. The result is returned to you in a clear, understandable format, so you can easily see your potential profit or loss.

If you have an active Microsoft 365 Copilot subscription, you can start using the Python-powered Copilot Chat for these other scenarios right away. 

Scenario 2: Analyze Sports Performance Trends (Data Insights) 

Are you a sports fan who loves analyzing team performance over time? With the new Python feature in Copilot Chat, you can pull data from public sources to examine trends and gain insights into your favorite teams or athletes. 

For example, you could ask Copilot Chat: 

"What was LeBron James average point per game in the last 10 years of the NBA season? Display the results in a line chart." 

Copilot Chat can pull in the latest player stats and give you an accurate average, helping you get a quick snapshot of player performance. You can also adjust this prompt to ask for data over a range of seasons or even compare two players' performance over time. This capability makes it easier than ever to stay on top of the latest sports trends without needing to sift through endless spreadsheets or websites. 

A line chart displaying the results using Python code interpreter.

How it works

  1. Open Microsoft 365 Copilot Chat.

  2. Input your sports-related question in natural language.

  3. Copilot will use real-time data from public sports sources to compute and deliver the result in a user-friendly format.

Scenario 3: Weather Forecasts (Historical and Real-Time Data) 

Another great way to use this feature is for tracking and analyzing weather patterns. If you’re planning an outdoor event or need to analyze historical weather trends, Copilot Chat can help. 

For instance, you can ask: 

"What was the temperature in Seattle on July 4th, 2020, and how does it compare to the average temperature for that day over the last 10 years? Format this data as a graph.” 

Copilot Chat will quickly pull in historical weather data and give you a detailed analysis, so you can understand how this year’s temperature stacks up against past trends. This feature is especially useful for event planners, outdoor enthusiasts, or anyone with a keen interest in climate and weather patterns. 

Graph displaying Seattle weather since 2020 using Python code interpreter.

How it works

  1. Open Microsoft 365 Copilot Chat.

  2. Type your weather query in natural language.

  3. Copilot will perform a web lookup to gather accurate historical weather data and provide you with a detailed graph you can use to estimate present or upcoming patterns.

Try it today

If you're a Microsoft 365 Copilot subscriber, you can start using the Python-powered Copilot Chat right away. This feature is designed to save you time and make complex data-driven tasks easier to calculate. Whether it’s financial analysis, sports performance tracking, or historical weather data, the possibilities are endless. 

See also

Get Started with Microsoft 365 Copilot Chat ​​​​​​​

Need more help?

Want more options?

Explore subscription benefits, browse training courses, learn how to secure your device, and more.