arXiv:2610.24729cs.LGOct 2026

Manuscript Offprint

arXiv:2610.24729

fxBench: Evaluating and Understanding Formula Suggestions in Spreadsheets

Sanket Mhatre, Sumit Gulwani, Vu Le, Yasharth Bajpai, Gust Verbruggen

Sanket Mhatre ∗^{*}

Proximal

sanket@proximal.so

Sumit Gulwani

Microsoft, USA

sumitg@microsoft.com

Yu Le

Microsoft, USA

levu@microsoft.com

Yasharth Bajpai

Microsoft, India

ybajpai@microsoft.com

Gust Verbruggen

Microsoft, Belgium

gverbruggen@microsoft.com

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.

1 Introduction

Spreadsheets are among the most widely used computational tools in the world, and formulas are the computational backbone of every spreadsheet. Yet, writing such formulas is still tedious and prone to errors for end-users [Gulwani, 2011, Hermans et al., 2012]. Modern spreadsheet assistants 2^{2} aim to resolve this by allowing users to describe specifications in natural language. Often, however, the required context is already there, and describing it requires more keystrokes or precise language than

∗^{*}Work completed while at Microsoft.

2^{2}Copilot in Microsoft Excel, Gemini in Google Sheets, or external tools like Shortcut, Claude for Excel, ChatGPT for Excel, and more.

Preprint.

Figure 1: The formula suggestion workflow. Given a spreadsheet and a target cell (left), a preprocessing step extracts and serializes the relevant context (middle), which is passed to an LLM that predicts the formula (right).

Figure

Figure

simply writing the formula. Excel and Google Sheets therefore both expose formula suggestions that trigger when users type the = sign, indicating that they are about to write a formula.

SpreadsheetCoder [Chen et al., 2021b] introduced this task—suggesting a formula from the surrounding context—as a research problem, but (1) did not introduce a public benchmark, (2) relied on a fixed and local context that limits applicability, (3) used embeddings (BERT, ≈\approx 40M parameters, 512 tokens context) to predict formulas using LSTMs, which limited capabilities compared to modern decoder models. In this paper, we tackle each of these limitations with the following main contributions.

We present fxBench, the first benchmark for formula suggestions, which consists of of 503 manually verified cases spanning 147 Excel formula types across 441 real workbooks from the Sheetpedia corpus [Tian et al., 2025]. Each case consists of a workbook, a target cell, and either the expected formula (454 cases) or an abstention indicator where we expect no formula because the intent is not clearly specified (49 cases). An example of the formula suggestion problem and language model solution is shown in Figure 1.

We break down formula suggestions in four capabilities by annotating each problem with the spreadsheet cells that describe the intent for that formula (and release those annotations), as well as a natural language description. This allows us to perform isolated experiments on context gathering, representation understanding, intent understanding, and formula writing.

We evaluate pre-trained and fine-tuned models on fxBench to understand key properties of the formula suggestion problem, including (1) the effect of context gathering (higher theoretical performance, lower actual performance) and representation (9.1% difference between best and worst) using inference-only models, and (2) the effect of supervised fine-tuning on smaller open models (Qwen3, Yang et al. [2025]), showing that the dense spreadsheet representation can be taught (pass@1 +11.1%, pass@3 +18.2%, best@8 +23.5% on the 8B model), that gains begin to saturate within Sheetpedia, and that fine-tuned models often produce a correct formula in their top-k candidates but struggle to rank it first (best@8 exceed pass@1 by +16.8% for 8B and +20.7% pp on 14B).