Applies ToExcel for Microsoft 365

Python in Excel is now available to Enterprise and Business users running the Current Channel on Windows, starting with Version 2408 (Build 17928.20114), and Monthly Enterprise Channel on Windows, starting with Version 2408 (Build 17928.20216).​​​​​​​ It’s available in preview for Family and Personal users running the Current Channel on Windows starting with Version 2405 (Build 17628.20164). Python in Excel is available in preview for Education users running the Current Channel (Preview) through the Microsoft 365 Insider Program. It's not currently available for the Semi-Annual Enterprise Channel.

It's rolling out to Excel for Windows first, and then to other platforms at a later date.  For more availability information, see Python in Excel availability.

If you encounter any concerns with Python in Excel, please report them by selecting Help Feedback in Excel.

What is Python in Excel?

Python in Excel brings the power of Python analytics into Excel. Use it to process data in Excel with Python code. You type Python directly into a cell, the Python calculations run in the Microsoft cloud, and your results are returned to the worksheet.

An Excel workbook using Python to analyze data.

Python in Excel comes with a core set of Python libraries provided by Anaconda that you can use to simplify your data analysis, find patterns and hidden insights, and visualize your data with plots. To learn more, see Open-source libraries and Python in Excel.

Important: To use Python in Excel, you need internet access.

How to enable Python in Excel 

Python in Excel is currently rolling out to Excel for Windows for customers with Enterprise or Business Microsoft 365 subscriptions running the Current Channel, starting with Version 2408 (Build 17928.20114), and Monthly Enterprise Channel, starting with Version 2408 (Build 17928.20216).

Python in Excel is available in preview for Family and Personal users running Current Channel on Windows, starting with Version 2405 (Build 17628.20164). 

If you have an Education subscription, join the Microsoft 365 Insider Program to use the Python in Excel preview. Choose the Current Channel (Preview) Insider level and install the latest build of Excel.

Don’t have Insider access? Sign up with your Microsoft, work, or school account to be notified about future availability for Python in Excel.

I'm interested 

If you have a qualifying Microsoft 365 subscription, take the following steps to use Python in Excel: 

  1. Open a blank workbook.

  2. Select Formulas in the ribbon.

  3. Select Insert Python.

Note: With a qualifying subscription, you can also enable Python in Excel by entering =PY into an Excel cell and then choosing PY from the function AutoComplete menu.

Start analyzing data right away with Get started with Python in Excel

The Python in Excel add-on

Purchasing the Python in Excel add-on license gives you access to additional Python in Excel features, like premium compute and more calculation mode options. Premium compute means faster Python formula calculation times. With more calculation mode options, you have the option to switch between manual, partial, or automatic calculation modes to control when and how often your workbooks recalculate Python formulas. To learn more, see What’s included in your Microsoft 365 subscription and Python in Excel add-on licensing FAQ.

Platform availability 

Python in Excel is available in Excel for Windows. The feature is not available on the following platforms.

  • Excel for Mac

  • Excel on the web

  • Excel for iPad

  • Excel for iPhone

  • Excel for Android

On unsupported platforms, workbooks containing Python can be viewed but Python cells display an error when recalculated. For more availability information, see Python in Excel availability.

Python runs in the cloud 

Python in Excel calculations run in the Microsoft Cloud with a standard version of the Python language. Python in Excel comes with a core set of Python libraries provided by Anaconda through a standard, secure distribution. To learn more, see Data security and Python in Excel.

You don't need a local version of Python to use Python in Excel. If you have a local version of Python installed on your computer, any customizations you've made to that Python installation won’t be reflected in Python in Excel calculations. 

Copilot in Excel with Python

Copilot in Excel with Python enables you to use AI (artificial intelligence) and Python in Excel together, without being a Python or Excel expert. Use it to get deeper insights from your data by leveraging the power of Python analytics with help from Copilot. To learn more, see Copilot in Excel with Python.

Terms of use

If you have a Microsoft 365 Family or Personal subscription, your use of this product is governed by the Microsoft Services Agreement.

If you have a Microsoft 365 Business or Education subscription, your use of this product is governed by the Product Terms.

Also, please note that notwithstanding the limitations in the Preview provision of the Microsoft Products and Services Data Protection Addendum (DPA), the following terms in the DPA apply to the preview: Processing of Personal Data, GDPR, and Data Security.

Related articles 

Need more help?

Want more options?

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

Communities help you ask and answer questions, give feedback, and hear from experts with rich knowledge.