microsoft / microsoft/calculator
Enable free-form input of math expressions
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 31.1k
- Forks
- 5.8k
- PR merge metrics
- No merged PRs in 30d
Description
Problem Statement
Today, when you input an expression, you are committing previous input with each operator, which means that you cannot easily edit or undo what you have already committed. We also have a key mapping such that keyboard keys are mapped to specific button inputs. This means that to enter "cos()", you actually press o. This is unintuitive and makes entering equations difficult.
We also currently only support linear input, which means we display this:
x ^ 2 + √(2x)
instead of this:

Evidence or User Insights
Our current keyboard mapping is unintuitive and requires extensive documentation to educate users (#157). Not only is free-form input more intuitive, there have been several issues opened that would require support for it as a pre-requisite (e.g., #163, #519, #150).
Proposal
Enable free-form input across calculator modes, which means that users can place the cursor anywhere inside of an equation input box to edit the expression. This also means that users can type or paste in "cos(x)", which feels natural, as this is how you would write this expression up on a whiteboard.
Note: This is the same input behavior that we are going to have in graphing mode.
Goals
- Users can input their equations with free-form input
- Expressions are displayed in rich MathML styling format
Non-Goals
- Build a parser (this is covered by #526, which is a prerequisite for this work)
- Introduce new input methods other than keyboard (e.g., inking input is covered by #24)
Low-Fidelity Concept

Just an example of rendering as MathML
Requested Assignment
I'm just suggesting this idea. I don't want to implement it.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing prerequisite issue #526 and how calculator modes currently accept and display equation input. Compare the proposal's free-form editing and MathML-rendering goals across modes; done means users can place the cursor in an equation, type or paste expressions such as "cos(x)", edit them, and see rich formatting.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- desktop, frontend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 32/100