fxBench: Evaluating and Understanding Formula Suggestions in Spreadsheets
Organizations: Proximal · Microsoft, USA · Microsoft, India · Microsoft, Belgium
Abstract
Spreadsheets are among the most widely used tools for computations, and formulas are their core building blocks. Besides agentic spreadsheet tools, proactive formula suggestions enable significant productivity gains and are now available in popular spreadsheet software (Microsoft Excel and Google Sheets). Such suggestions pose interesting challenges: the right context must be collected and represented for a machine learning model, which must then be able to write a correct formula, in a way that is fast and cheap enough to trigger on every = (or subsequent keystrokes for auto-completion) without taking users out of their editing flow. Surprisingly, there is no public benchmark for formula suggestions on real spreadsheets. In this paper, we therefore (1) introduce fxBench as a manually curated benchmark of 503 formula suggestion tasks based on Sheetpedia, (2) break down the formula suggestion problem into four capabilities (gather context, understand context, understand intent, write formula) that a formula suggestion system requires, and (3) evaluate existing and new approaches to understand bottlenecks in these capabilities that pose interesting research directions. Specifically, we annotate each benchmark with the cells that describe intent to determine the theoretical performance limit of a given context selection strategy, we evaluate performance of small and large models on different representations of context, including a dense format with high theoretical coverage at low token counts, and we fine-tune smaller language models to show that we can learn to understand such dense formats. Additionally, we perform quantitative and qualitative analysis on failure modes to understand bottlenecks in the formula writing capability; the best configuration only achieved 58.8% correct suggestions.
Figures & tables
| Context | Intent printed | Intent mentioned | Ref. printed | Ref. mentioned | Upper | Tok (Avg) | Tok (Median) |
| Pipe-delimited | 100.0% | 100.0% | 100.0% | 100.0% | 100.0% | 19,984 | 3,128 |
| Viewport ( ) | 82.1% | 82.1% | 70.8% | 70.8% | 69.0% | 2,603 | 1,913 |
| Viewport ( ) | 94.6% | 94.6% | 85.7% | 85.7% | 85.1% | 3,806 | 2,574 |
| Viewport ( ) | 98.2% | 98.2% | 90.1% | 90.1% | 89.9% | 4,533 | 2,881 |
| SpreadsheetCoder | 74.8% | 74.8% | 61.8% | 61.8% | 59.0% | 1,806 | 1,364 |
| SheetCompressor | 90.5% | 100.0% | 43.5% | 100.0% | 94.6% | 5,156 | 1,372 |
| Class | Representation | GPT 5.2 | Sonnet 4.6 | Qwen3-8B | ||||||
|---|---|---|---|---|---|---|---|---|---|---|
| acc | acc † | ovl | acc | acc † | ovl | acc | acc † | ovl | ||
| F | HTML | 58.3 | 58.3 | 67.6 | 60.0 | 60.0 | 71.0 | 20.7 | 20.7 | 36.1 |
| CSV | 49.7 | 49.7 | 63.5 | 53.3 | 53.3 | 64.9 | 9.3 | 9.3 | 21.6 | |
| JSON | 56.9 | 56.9 | 67.1 | 60.4 | 60.4 | 69.7 | 14.5 | 14.5 | 30.6 | |
| Markdown | 53.3 | 53.3 | 66.1 | 54.7 | 54.7 | 67.5 | 11.3 | 11.3 | 25.2 | |
| Pipe-delimited | 58.8 | 58.8 | 66.3 | 59.8 | 59.8 | 69.9 | 12.1 | 12.1 | 27.4 | |
| Comparison | Model | Training data | Records | pass@1 | pass@3 | best@8 |
|---|---|---|---|---|---|---|
| Base context | Qwen3-4B | – | – | 10.8% | 12.6% | 13.9% |
| Base context | Qwen3-8B | – | – | 9.7% | 12.2% | 14.5% |
| Base context | Qwen3-14B | – | – | 10.0% | 13.4% | 15.5% |
| Model size | Qwen3-4B | Curated | 25,614 | 16.5% | 25.7% | 32.8% |
| Model size / anchor | Qwen3-8B | Curated | 25,614 | 21.2% | 30.4% | 38.0% |
| Model size | Qwen3-14B | Curated | 25,614 | 19.5% | 30.3% | 40.2% |
Appendix figures & tables14 assets
Supplementary material from the paper’s appendix.
Appendix
| Statistical (36 functions, 139 records) | |||
| AVERAGE (17) | COUNTIFS (16) | COUNTIF (15) | MIN (13) |
| MAX (12) | LARGE (10) | COUNTA (7) | COUNT (4) |
| INTERCEPT (4) | SMALL (4) | AVERAGEIF (3) | AVERAGEIFS (3) |
| FORECAST (3) | MINIFS (3) | LINEST (2) | STDEV.P (2) |
| MAXA (2) | AVERAGEA (1) | CORREL (1) | COUNTBLANK (1) |
| FORECAST.LINEAR (1) | MAXIFS (1) | MINA (1) | MODE.MULT (1) |
| Failure label | Description |
|---|---|
| incorrect_formula_type | The prediction uses a different root function or a substantially different nested-function strategy from the target. |
| right_type_incorrect_args | The root and nested function structure are broadly correct, but non-range arguments such as criteria, constants, operators, argument order, or wrapper arguments are wrong. |
| right_type_incorrect_range | The root and nested function structure are broadly correct, but one or more referenced cells or ranges are wrong. |
| partial_correct | The prediction shares the outer formula strategy and some nested structure, but an important nested subexpression is missing, added, or replaced. |
| abstain_wrong | The model makes an abstention mistake: it abstains when a formula is expected, or produces a formula when abstention is expected. |
| syntax_error | The predicted formula cannot be parsed or accepted as a valid Excel formula. |
| Context Builder | Model | TP | FP | TN | FN | Acc% | Overlap% | Syntax% | Sketch% |
| Full-sheet strategies | |||||||||
| HTML | GPT-5.2 | 281 | 204 | 12 | 6 | 58.3 | 67.6 | 98.0 | 27.4 |
| Sonnet-4-6 | 288 | 199 | 14 | 2 | 60.0 | 71.0 | 91.3 | 27.4 | |
| Qwen3-8B | 90 | 352 | 14 | 47 | 20.7 | 36.1 | 81.9 | 3.2 | |
| CSV | GPT-5.2 | 236 | 243 | 14 | 10 | 49.7 | 63.5 | 96.8 | 25.6 |
| Sonnet-4-6 | 251 | 230 | 17 | 5 | 53.3 | 64.9 | 91.8 | 24.9 | |
Spreadsheet Automation
Spreadsheet automation uses AI to understand, create, edit, and validate workbooks while preserving their formulas, structure, and intended use.
See all 20 papers