Guide · Open source
How to use calculator: Windows Calculator source code guide
Updated · written with AI from the project's own documentation and checked against our catalogue data
microsoft/calculator is the open-source code for the Calculator app that ships with Windows 11. It is written in C++ and C# and published under the MIT License. This guide explains what the project contains, what you need installed, how to clone and build it, and where to report problems, so you can read, modify or contribute to the app.
Quick start
- 1Check your Windows version. Confirm you run Windows 11, build 22000 or newer, because the project does not support earlier Windows versions.
- 2Install Visual Studio components. Install Visual Studio with the Universal Windows Platform Development workload, the optional C++ Universal Windows Platform tools and the latest Windows 11 SDK.
- 3Install XAML Styler. Add the XAML Styler extension to Visual Studio from the Visual Studio Marketplace.
- 4Clone the repository. Run git clone https://github.com/Microsoft/calculator.git in a terminal to download the source.
- 5Open and build the solution. Open src\Calculator.slnx in Visual Studio and build and run the Calculator app from there.
- 6Read the architecture notes. Open docs/ApplicationArchitecture.md to understand how the app is organized before changing code.
What the calculator app does
The app provides standard, scientific and programmer calculator functionality, along with converters between units of measurement and currencies. Its features also include date calculation, calculation history and memory.
Standard mode evaluates each command immediately as it is entered. Scientific mode uses order of operations. Programmer mode includes conversion between common bases. Date calculation can show the difference between two dates or add or subtract years, months and days from a date.
Basic arithmetic (addition, subtraction, multiplication and division) uses infinite precision, so calculations are not meant to lose precision.
Check the prerequisites before you start
The project targets Windows 11 only. Your computer must run Windows 11, build 22000 or newer. Windows 10 and earlier are not supported by this source.
You also need Visual Studio, with the Universal Windows Platform Development workload, the optional C++ Universal Windows Platform tools component and the latest Windows 11 SDK. The README notes the free Community edition is sufficient. You also need the XAML Styler Visual Studio extension and Git.
- Windows 11, build 22000 or newer
- Visual Studio with the Universal Windows Platform Development workload
- Optional: C++ Universal Windows Platform tools component
- Latest Windows 11 SDK
- XAML Styler Visual Studio extension
- Git
Clone the repository and open the solution
Clone the source code with Git using the command below. This copies the repository to your computer.
Then open src\Calculator.slnx in Visual Studio. Building and running the Calculator app is done from Visual Studio. The README also points to ApplicationArchitecture.md in the docs folder for an overview of how the project is structured.
git clone https://github.com/Microsoft/calculator.gitRun UI tests (optional)
To run the UI Tests, you need Windows Application Driver (WinAppDriver) installed. The README links to its releases page for the download.
Diagnostic data is disabled in development builds by default. It can be turned on with the SEND_DIAGNOSTICS build flag.
Know the limits of developer builds
Developer builds do not have working graphing. The UI for graphing is in the repository, but the proprietary graphing engine is not. Developer builds use a mock implementation instead.
The currency converter in developer builds uses mock data. The mock data is identifiable because it references planets instead of countries, and it stays the same regardless of inputs. The data Microsoft uses in the retail app is not licensed for your use.
Report bugs or contribute changes
The team welcomes community feedback and contributions. Follow the contributing guidelines in CONTRIBUTING.md. Issues can be submitted on GitHub.
If Calculator is not working properly in the retail app, the README asks you to file a report in the Feedback Hub. Security issues should be reported as described in SECURITY.md.
What people use it for
- Reading how a XAML and UWP desktop app is structured
- Modifying the built-in Windows 11 calculator in your own build
- Reporting bugs or suggesting changes to the official calculator
- Studying how a real-world Windows app is organized for a class project
Frequently asked questions
Is Windows Calculator open source?
Yes. The source code for the Calculator app included with Windows 11 is published on GitHub under the MIT License. The README says the app is written in C++ and C#.
What do I need to build microsoft calculator?
You need Windows 11 build 22000 or newer, Visual Studio with the Universal Windows Platform Development workload, the latest Windows 11 SDK, the XAML Styler extension and Git. The README says the free Community edition of Visual Studio is sufficient.
Does the calculator work on Windows 10?
The README requires Windows 11 build 22000 or newer, so this source is not meant for Windows 10 or earlier. For the ready-made app on other systems, the README points to the Microsoft Store.
Is graphing available in the open-source calculator?
Not in developer builds. The graphing UI is in the repository, but the proprietary graphing engine is not, so developer builds use a mock implementation without working graphing.
Where can I get the calculator without building it?
The README says the latest version ships in the Microsoft Store and is pre-installed with Windows. Building from source is only needed if you want to read or change the code.
How do I report a problem with Windows Calculator?
For problems with the retail app, the README asks you to file a report in the Feedback Hub. For issues with this source code, you can submit them on GitHub, following CONTRIBUTING.md.
New agent skills, repos and AI tools — every week
The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.
Our verdict
This source suits Windows 11 users who want to read or modify the built-in calculator, developers studying a XAML and UWP app, and students learning how a real Windows app is organized. If you only need a calculator to use, the Microsoft Store or the built-in app is simpler. If you need graphing, cross-platform support or Windows 10, look at other projects such as Qalculate, SpeedCrunch, GNOME Calculator or Insect.
Install options & downloads