Solve ABC Help & Reference

Solve ABC is a brute-force solver for alphametics (word sums like SEND + MORE = MONEY) and general constraint puzzles over letters. You give each letter a range of possible values and a set of equations or inequalities it must satisfy, and the tool searches every combination for the assignments that make all of them true at once. Everything runs in your browser — nothing is uploaded.

Quick start

  1. Press a Try a sample button in the header to load a worked example, or start from scratch.
  2. Set each letter's min/max value and whether its value must be unique in the Constraints grid.
  3. Type one expression per line in the Expressions box (e.g. SEND+MORE==MONEY).
  4. Press Analyze. Solutions stream into the Output panel as they are found.

On this page

The constraints grid

Each usable letter — the Latin letters AZ followed by the Greek letters α β γ δ ε ζ η θ κ λ ξ ρ σ τ ψ ω — has a row with three controls:

ControlMeaning
Checkbox (left of the letter)Whether this letter's value must be unique among the other ticked letters.
First number boxThe minimum value the letter can take (default 0).
Second number boxThe maximum value (default 9) — or a comma-separated list of the exact values allowed.

A letter you don't use in any expression is simply ignored, so you only need to set ranges for letters that appear.

Uniqueness

Tick a letter's checkbox to require it to hold a value different from every other ticked letter. This is what makes a classic alphametic work: in SEND + MORE = MONEY every letter stands for a different digit, so all the participating letters are ticked.

Allowed-value lists

Instead of a single maximum, the max box accepts a comma-separated list of the only values the letter may take, e.g. 2,4,6,8 to restrict it to even digits.

Important: the search still starts a letter at its min value, so set the min to the lowest value in your list (e.g. min 2 for a list of 2,4,6,8). Otherwise the min value leaks in as an extra, unwanted candidate.

Writing expressions

Enter one expression per line. Each line is a relationship that a valid solution must satisfy. Two shapes are common:

A single = is treated the same as == (equality), so you can write equations naturally. Whitespace is ignored.

Operators

OperatorMeaning
= / ==Equal to
!=Not equal to
>   <Greater than / less than
>=   <=Greater/less than or equal to
+ - * /Arithmetic
^Power (e.g. I ^ 2)
%Modulo / remainder (e.g. D % 10 == 9)
( )Grouping

Alphametic words

A run of two or more capital Latin letters is read as a multi-digit number, with each letter a digit and the leftmost the most significant. So SEND is expanded to S·1000 + E·100 + N·10 + D automatically. That is what lets you write SEND+MORE==MONEY directly instead of spelling out the place values.

This expansion applies only to capital-letter runs. Greek letters are always single variables, so use them when you want plain one-digit unknowns rather than word digits.

For genuine alphametics, give each leading letter a min of 1 so a number doesn't start with a zero (e.g. in SEND+MORE=MONEY, set S and M to min 1).

Math functions

Expressions are evaluated with the math.js engine, so its functions are available — for example:

Example: A = floor(C / D), I = sqrt(C).

Output & controls

Tips

← Back to Solve ABC