MAI Code 2 and MAI Code 2 Flash Pricing Calculator

Free · No sign-up · Runs entirely in your browser

This MAI Code 2 pricing calculator estimates GitHub Copilot token cost for MAI Code 2 and MAI Code 2 Flash on one page. There is no second URL. Promotional rates, checked November 20, 2026, run until May 17, 2027: MAI Code 2 is $0.50 input, $0.025 cached input, and $2.50 output per 1M tokens. MAI Code 2 Flash is $0.05, $0.005, and $0.25. Starting May 17, 2027, list price is $1.00 / $0.05 / $5.00 for MAI Code 2 and $0.10 / $0.01 / $0.50 for Flash. The official table has no cache-write rate and no long-context price. The page opens on the promotional rates and does not switch from your clock. NewModelHub is not affiliated with Microsoft or GitHub and is not an official site.

Go to Calculator

Calculate MAI Code 2 or Flash Cost

Both models stay on /mai-code-2-pricing-calculator/. Flash does not have its own page. MAI-Code-1.1-Flash is a different row on the GitHub table ($0.20 input, $0.02 cached input, $1.20 output) and is not selected here.

GitHub's footnote wording is "until May 17, 2027. Starting May 17, 2027". This page was built before that date, so promotional rates are the starting selection. Pick list price when you want it. The visitor's clock does not flip the estimate.

The documented sample is 12,000 uncached input tokens, 24,000 cached input tokens, and 800 output tokens. Expected totals: Code 2 promotional $0.008600, Code 2 list $0.017200, Flash promotional $0.000920, Flash list $0.001840.

Enter each token once. Cached input is reuse of context GitHub prices as cached input, not a second copy of the uncached prompt. There is no cache-write input because the official Microsoft rows do not list one. There is no long-context price tier, so a longer prompt uses the same per-token rates.

Your Estimate

MAI Code 2 · Powerful · Promotional price, until May 17, 2027

Uncached input$0.006000
Cached input$0.000600
Output$0.002000

Cost per request: $0.008600

AI credits per request: 0.860000. GitHub states that 1 AI credit = $0.01 USD.

Estimated monthly cost: $8.60

AI credits per month at this request count: 860.000000.

Line items use MAI Code 2, Promotional price, until May 17, 2027: input $0.50 · cached input $0.025 · output $2.50 per 1M tokens. No cache-write line. 1 AI credit = $0.01.

Both schedules on this workload

Until May 17, 2027 (promotional)$0.008600 / request · $8.60 / month · 0.860000 credits / request
Starting May 17, 2027 (list price)$0.017200 / request · $17.20 / month · 1.720000 credits / request

The per-request total uses the promotional rate, until May 17, 2027. The list-price row is the same tokens starting May 17, 2027. It is not added on top. This page does not change the selection from your clock.

MAI Code 2 and Flash Rate Card (per 1M tokens)

Rates are the GitHub Copilot Microsoft table. The cells in the table are the promotional prices. Footnotes 4 and 5 state the cutoff and the list price. Checked November 20, 2026.

ModelScheduleInputCached inputOutput
MAI Code 2 (GA, Powerful)Until May 17, 2027$0.50$0.025$2.50
MAI Code 2 (GA, Powerful)Starting May 17, 2027$1.00$0.05$5.00
MAI Code 2 Flash (GA, Lightweight)Until May 17, 2027$0.05$0.005$0.25
MAI Code 2 Flash (GA, Lightweight)Starting May 17, 2027$0.10$0.01$0.50

Sources: Models and pricing for GitHub Copilot (footnotes 4 and 5), the GitHub changelog for November 17, 2026, Microsoft's introducing post, and the Microsoft Ignite 2026 post. List price is double the promotional price on every published cell. Cached input on MAI Code 2 is 5% of uncached input. Cached input on Flash is 10% of uncached input. Output is 5× uncached input on both models. Those ratios describe the published dollar amounts.

Documented sample

One request: 12,000 uncached input tokens, 24,000 cached input tokens, 800 output tokens. MAI Code 2 promotional arithmetic is 12,000 × $0.50 / 1,000,000 = $0.006, plus 24,000 × $0.025 / 1,000,000 = $0.0006, plus 800 × $2.50 / 1,000,000 = $0.002, which sums to $0.008600. List price is twice that. Flash is one tenth of the matching MAI Code 2 total.

RowPer request
MAI Code 2, until May 17, 2027$0.008600
MAI Code 2, starting May 17, 2027$0.017200
MAI Code 2 Flash, until May 17, 2027$0.000920
MAI Code 2 Flash, starting May 17, 2027$0.001840
GPT-6.1 Sol Default, input ≤272K, cache write omitted$0.034400
Claude Opus 5.5, cache write omitted$0.068800

The Sol and Opus rows use the same three token counts and zero cache-write tokens. They are not added to the MAI total. At 1,000 requests a month, MAI Code 2 promotional is $8.60, which is 860 AI credits.

Same token counts on the GitHub price table

These rows use your uncached input, cached input, and output. They come from the same models-and-pricing table. They are not OpenAI or Anthropic direct-API prices, and they are not the rates on the GPT-6.2 Astra calculator.

GPT-6.1 Sol$0.034400
Claude Opus 5.5$0.068800

Default tier (input ≤272,000): input $2.00, cached input $0.10, output $10.00 per 1M.

Single published tier: input $4.00, cached input $0.20, output $20.00 per 1M. No long-context tier on this table.

Cache write is omitted: 0 cache-write tokens. MAI Code 2 and MAI Code 2 Flash have no cache-write rate on the GitHub table, so this comparison does not bill one.

ModelTierInputCached inputCache writeOutput
GPT-6.1 SolDefault, input ≤272K$2.00$0.10$2.50$10.00
GPT-6.1 SolLong context, input >272K$4.00$0.20$5.00$15.00
Claude Opus 5.5Default (no long-context tier)$4.00$0.20$5.00$20.00

The cache-write column is the published rate. The live comparison leaves it unused because MAI has no cache-write field to match. If uncached plus cached input is above 272,000, the Sol total switches to the long-context row for the whole request. Opus 5.5 has a single tier. MAI rates do not change at that threshold.

Where the models are available

  • MAI Code 2: Copilot Pro, Pro+, Max, Business, and Enterprise. The changelog does not list Copilot Free or Student for MAI Code 2.
  • MAI Code 2 Flash: Copilot Free, Student, Pro, Pro+, Max, Business, and Enterprise.
  • Both models are available to eligible GitHub Copilot subscribers on annual plans.
  • The changelog lists the model picker in Visual Studio Code, Visual Studio, Copilot CLI, GitHub Copilot cloud agent, the GitHub Copilot app, github.com, GitHub Mobile for iOS and Android, JetBrains, Xcode, and Eclipse.
  • Copilot Business and Enterprise administrators manage MAI model access in the Copilot model policy. Under default model enablement, new models are enabled automatically unless an administrator has turned off the global default or explicitly disables the model.
  • Metered usage above the included allowance is billed in GitHub AI credits at these per-token rates. 1 AI credit = $0.01 USD. Included allowances differ by plan and are not printed as a token bundle on the models-and-pricing table, so this calculator estimates token cost and the credit equivalent. It does not subtract a plan allowance.

Context window

GitHub's supported-models page, checked November 20, 2026, marks MAI Code 2 and MAI Code 2 Flash as supported for the 1 million token context window and for configurable reasoning. The same page says the 1 million token context window is available in Visual Studio Code and Copilot CLI only, and that a supported model can use the default context size or the extended 1 million token context. It does not print the default size as a number. This calculator does not fill that gap, and it does not add a long-context price. The models-and-pricing table has no long-context tier for either MAI model, so every token uses the schedule you selected.

Microsoft Foundry is out of scope. The introducing post and the Ignite 2026 post say MAI Code 2 Flash is in limited-access preview in Microsoft Foundry. They do not list Foundry token prices. This page does not add a Foundry calculator.

Vendor claims, attributed

The figures below are Microsoft's statements. NewModelHub did not run these benchmarks and does not treat the percentages as its own measurement.

Averaged over four widely used benchmarks that target the everyday enterprise coding tasks we see in GitHub Copilot (DeepSWE 1.1, Terminal Bench 2.1, SWE-Atlas and FrontierCode v1.1), MAI Code 2 gives you 98% of the performance of GPT-6.1 Sol at 40% of the cost, and 96% of Claude Opus 5.5's performance at just 5% of the cost.

That sentence is from Introducing MAI Code 2 and MAI Code 2 Flash. The Ignite 2026 post repeats the comparison as 98% of GPT-6.1 Sol at about 40% of the price, and 96% of Opus 5.5 at 5% of the price. Footnote 1 on the introducing post says: all models were run at max reasoning effort; DeepSWE 1.1, TerminalBench 2.1, and SWE Atlas were run on MSBench (Microsoft's internal eval platform) with the GitHub Copilot CLI without subagents; FrontierCode 1.1 scores and costs are from Artificial Analysis; MAI Code 2 cost is shown at its 50% promotional price. The body and the footnote spell the benchmark names differently. Both spellings are quoted as published.

MAI Code 2 Flash offers comparable performance to GPT-6 Luna and Claude Haiku 5.5 at 65% and 20% of the cost, across three coding benchmarks measuring day-to-day, high-volume routine coding tasks.

That sentence is from the same introducing post. The Ignite post says Flash performs comparably to GPT-6 Luna and Claude Haiku 5.5 at 65% and 20% of the price, across DeepSWE 1.1, Terminal Bench 2.1, and SWE-Atlas. Footnote 3 says all models were run at max reasoning effort; those three benchmarks were run on MSBench with the GitHub Copilot CLI without subagents; and MAI-Code-2-Flash cost is shown at its 50% promotional price.

Microsoft's Ignite 2026 post also says the models are "explicitly not yet tuned for harder problems, like fundamental science research and very long horizon agentic work." The introducing post uses the hyphenated form "very long-horizon" in that same sentence.

What drives the estimate

  1. The schedule doubles every rate on May 17, 2027. Promotional MAI Code 2 input is $0.50 per million tokens. List price is $1.00. Flash moves from $0.05 to $0.10. Cached input and output double with them. Select the schedule. Both totals stay visible so the cutoff is not hidden.
  2. Cached input is much cheaper than uncached input, and only when the token is actually cached. On promotional MAI Code 2, cached input is $0.025 against $0.50 uncached. Putting the same tokens in both boxes bills them twice.
  3. Output is five times the uncached input rate on both models and both schedules. An 800-token answer is a small share of the documented sample. A long answer is not.
  4. There is no cache-write charge to trade against cached reads, and no long-context cliff on the MAI rows. A prompt past 272,000 tokens does change the GPT-6.1 Sol comparison row, because that model has a long-context tier on the same table. It does not change the MAI line items.
  5. Credits are the dollar total divided by $0.01. Plan allowances, taxes, and separate product fees are outside this estimate.

Those pages estimate other published rates. They are not a second price for MAI Code 2 or MAI Code 2 Flash, and they are not the GitHub Copilot table used in the comparison above.

FAQ

How much does MAI Code 2 cost in GitHub Copilot?

Promotional pricing, checked November 20, 2026 in footnote 4 of GitHub's models-and-pricing page, is $0.50 per 1M input tokens, $0.025 per 1M cached input tokens, and $2.50 per 1M output tokens until May 17, 2027. Starting May 17, 2027, list price is $1.00, $0.05, and $5.00. MAI Code 2 is GA and categorized as Powerful. The Microsoft table has no cache-write rate for it.

How much does MAI Code 2 Flash cost?

Promotional pricing in footnote 5 is $0.05 per 1M input tokens, $0.005 per 1M cached input tokens, and $0.25 per 1M output tokens until May 17, 2027. Starting May 17, 2027, list price is $0.10, $0.01, and $0.50. MAI Code 2 Flash is GA and categorized as Lightweight. It stays on this page. There is no second Flash URL.

When does list price replace the promotional price?

GitHub's wording is until May 17, 2027. Starting May 17, 2027. The calculator opens on the promotional rates and does not switch from the visitor's clock. Select list price yourself when you want that schedule. Both totals stay on screen.

Is there a cache-write rate or a long-context price?

No. The Microsoft rows list input, cached input, and output only. This calculator has no cache-write field and no long-context multiplier. GPT-6.1 Sol and Claude Opus 5.5, on the same GitHub table, do publish cache-write rates. The comparison sets cache-write tokens to 0 and says so.

What context window do the official docs state?

On November 20, 2026, GitHub's supported-models table marks both MAI Code 2 and MAI Code 2 Flash as supported for the 1 million token context window and for configurable reasoning. That 1 million token window is available in Visual Studio Code and Copilot CLI only. The page also says a supported model can use the default context size or the extended 1 million token context, and it does not print the default size as a number. This calculator does not invent a default window, and the token price does not change with length.

Which Copilot plans include MAI Code 2 and MAI Code 2 Flash?

The November 17, 2026 GitHub changelog lists MAI Code 2 for Copilot Pro, Pro+, Max, Business, and Enterprise. It does not list Copilot Free or Student for MAI Code 2. MAI Code 2 Flash is listed for Copilot Free, Student, Pro, Pro+, Max, Business, and Enterprise. Both models are available to eligible GitHub Copilot subscribers on annual plans.

Does this page price Microsoft Foundry?

No. Microsoft's posts say MAI Code 2 Flash is in limited-access preview in Microsoft Foundry and do not list Foundry token prices. This page prices the GitHub Copilot table only.

How do AI credits relate to these dollar rates?

GitHub states that 1 AI credit equals $0.01 USD. Divide the dollar estimate by 0.01 to read it in credits. A documented sample of 12,000 uncached input tokens, 24,000 cached input tokens, and 800 output tokens is $0.008600 on MAI Code 2 promotional rates, which is 0.86 credits.

Are the performance and cost claims measured by NewModelHub?

No. They are Microsoft's claims. The introducing post says that, averaged over DeepSWE 1.1, Terminal Bench 2.1, SWE-Atlas, and FrontierCode v1.1, MAI Code 2 gives 98% of the performance of GPT-6.1 Sol at 40% of the cost, and 96% of Claude Opus 5.5's performance at 5% of the cost. Footnote 1 says all models ran at max reasoning effort; DeepSWE 1.1, TerminalBench 2.1, and SWE Atlas ran on MSBench with the GitHub Copilot CLI without subagents; FrontierCode 1.1 scores and costs are from Artificial Analysis; and MAI Code 2 cost is shown at its 50% promotional price. MAI Code 2 Flash is described as comparable to GPT-6 Luna and Claude Haiku 5.5 at 65% and 20% of the cost, also at the 50% promotional price. Microsoft also says the models are explicitly not yet tuned for harder problems, like fundamental science research and very long horizon agentic work.

Is this an official Microsoft or GitHub tool?

No. NewModelHub is an independent, unofficial calculator. It is not affiliated with Microsoft or GitHub and is not an official site. GitHub's invoice and the models-and-pricing page are authoritative. Rates were checked on November 20, 2026. Contact hello@newmodelhub.com.

Methodology: token cost is tokens × rate / 1,000,000. Rates checked November 20, 2026 against https://docs.github.com/copilot/reference/copilot-billing/models-and-pricing, the GitHub changelog, the introducing post, and the Ignite 2026 post. Estimates exclude taxes and plan allowances. NewModelHub is not affiliated with Microsoft or GitHub and is not an official site. Contact hello@newmodelhub.com.