Lotus 1-2-3
The 1983 IBM PC spreadsheet whose @function formula language and keystroke macro language became, for a decade, the way most office workers programmed a computer
Created by Mitch Kapor (design) and Jonathan Sachs (programming), Lotus Development Corporation
Lotus 1-2-3 was the spreadsheet that made the IBM PC a business machine. Released on 26 January 1983 by Lotus Development Corporation, it combined a worksheet, business graphics and a simple database in one program — the “1-2-3” of the name — and for most of the 1980s it was the most widely used application on personal computers. For CodeArchaeology its interest is as a language: its cell formulas, built from operators and @functions, and its macro system, which grew from recorded keystrokes into a full imperative language with variables, branches, loops and subroutines. For a decade, a 1-2-3 worksheet was the first program many office workers ever wrote.
History & Origins
After VisiCalc
The electronic spreadsheet arrived with VisiCalc on the Apple II in 1979, and VisiCalc was ported to the IBM PC when that machine launched in 1981. Mitch Kapor was a friend of the VisiCalc developers and had written software for it. In 1982 he and programmer Jonathan Sachs founded Lotus Development Corporation in Cambridge, Massachusetts, to build a spreadsheet designed for the PC from the start rather than ported to it.
Sachs wrote 1-2-3 in x86 assembly language, and the program wrote directly to video memory instead of going through the slower DOS and BIOS text routines. Kapor designed the product and its documentation. The plan for the third module was originally a word processor; it became a database instead.
Preview and release
BYTE’s senior editor Gregg Williams reviewed a pre-release copy in the December 1982 issue. He described a 2,048-row by 256-column worksheet priced at $495, with 41 functions (VisiCalc had 28), five chart types, and records that could be sorted and queried in place. He called the program “modestly revolutionary” for the way it joined three kinds of software into one.
1-2-3 shipped on 26 January 1983, with Release 1A following in April. It kept VisiCalc’s familiar model — A1 cell references and a menu opened with the slash key — while adding speed, charts and macros. It overtook VisiCalc quickly, and Lotus’s success turned the IBM PC into the default office computer.
Design Philosophy
1-2-3’s language has two layers that work very differently.
- Formulas are declarative. A cell holds a value or an expression over other cells. The user never says when to compute; 1-2-3 recalculates the worksheet when inputs change. This is dataflow programming, although nobody called it that at the time.
- Macros are imperative. A macro is a column of text cells that 1-2-3 “types” as if the user were pressing keys. Menu commands, cursor moves and data entry are all keystrokes, so anything a user can do by hand, a macro can repeat.
The menus did a great deal of design work. Every command was a path of words in the slash menu (/File Retrieve, /Range Format Currency), and pressing the first letter of each word chose it. That made the menu system the macro language’s vocabulary: the macro /FR retrieves a file because those are the keys a person would press. This tight link between interface and programming language was what Lotus later tried to protect in court.
Key Features
Cells and formulas
A 1-2-3 entry is either a value (a number or formula) or a label (text). The first character decides which: a formula that starts with a cell reference needs a leading + so it is not read as text.
| |
Key notation:
| Element | Example | Meaning |
|---|---|---|
| Cell reference | B2 | Column B, row 2 |
| Range | A1..A10 | Two dots separate the corners of a range |
| Absolute reference | $B$2 | Does not shift when the formula is copied |
| @function | @SUM(A1..A10) | Built-in functions are prefixed with @ |
| Logical operators | #AND#, #OR#, #NOT# | Boolean operators are delimited with # |
| Range name | @SUM(SALES) | Named ranges stand in for addresses |
@functions
The Release 2.3 Functions and Macros Guide sorts the @functions into nine categories: add-in, database statistical, date and time, financial, logical, mathematical, special, statistical and string. A few examples, with their documented syntax:
| |
The database @functions point to the “2” of 1-2-3: a worksheet range with field names in its first row acts as a table, and a criteria range in the same worksheet selects records.
Dates are serial numbers counted from the start of 1900. To keep the arithmetic simple, 1-2-3 treated 1900 as a leap year, which it was not. Microsoft documents that Multiplan and Excel kept the same mistake on purpose so that worksheets moved between the programs would keep the same date serials — and Excel still has it.
Macros: from keystrokes to a language
In the first releases, a macro was a range of label cells named with a backslash and a letter (\A to \Z) and run by holding Alt and pressing the letter. A tilde (~) stood for the Enter key, and special key names went in braces. A small set of /X commands (such as /XL, /XM and /XN) handled user prompts, custom menus and program flow. Edward Rosen of Monsanto, writing in 1990, said that these early macros “were difficult to use and to follow.”
Release 2 (1985) added the Advanced Macro Commands, written as keywords in braces. In Rosen’s words, they were “named in such a way as to be much more understandable.” They include:
| Command | Purpose |
|---|---|
{LET location,entry} | Assign a number or label to a cell |
{IF condition} | Run the rest of the cell only if the condition is true |
{BRANCH location} | Jump to another macro instruction |
{FOR counter,start,stop,step,subroutine} | Counted loop that calls a subroutine |
{subroutine} | Call a named subroutine |
{RETURN} | Return from a subroutine |
{GETNUMBER prompt,location} | Prompt the user for a number |
{QUIT} | End the macro |
A macro that prompts for the loan figures used above and recalculates:
| |
Each line is an ordinary text cell in a column; 1-2-3 runs the cells top to bottom until it reaches a blank cell or {QUIT}. The program lives in the same grid as the data it works on, so a macro can rewrite its own instructions — a property that made 1-2-3 macros both powerful and notoriously hard to debug.
Evolution
| Release | Year | Language-relevant changes |
|---|---|---|
| 1 / 1A | 1983 | Formulas, @functions, keystroke macros, /X commands |
| 2 / 2.01 | 1985 / 1986 | Advanced Macro Commands, add-ins, expanded memory |
| 3 | 1989 | Rewritten in C; multiple sheets in one file (three-dimensional ranges) |
| 2.2 / 2.3 / 2.4 | 1989–1992 | The assembly-language line continued, with WYSIWYG added in 2.3 |
| 1-2-3/G | 1989 | OS/2 version |
| 1-2-3 for Windows | 1991 | First Windows release, functionally similar to Release 3 |
| 97 Edition | 1997 | First 32-bit version; adds LotusScript |
| Millennium Edition 9.8 | 2002 | Final release |
The move to C for Release 3 took more than a year longer than planned, and the larger compiled program would not fit on older PCs. Lotus split the product: Release 3 for 80286 and later machines and Release 2.2, built on the old assembly code, for everyone else. Microsoft Excel arrived on Windows during that period and, as Windows 3.0 spread after 1990, it gradually took 1-2-3’s market. IBM bought Lotus in 1995, largely for Lotus Notes, and kept 1-2-3 alive inside SmartSuite. LotusScript, a BASIC-like language already used across Lotus products, arrived in 1-2-3 with the 97 Edition, so the old brace macros were no longer the only way to program the spreadsheet.
1-2-3 also ran well beyond DOS and Windows. There were versions for OS/2, the Macintosh (1991), several Unix systems including UNIX System V/386 (1990) and Sun workstations, IBM mainframes and, according to Wikipedia, a character-cell version for OpenVMS.
The look-and-feel cases
1-2-3’s macro language turned its menus into an interface other programs had to copy. Clones such as Mosaic Software’s The Twin and Paperback Software’s VP-Planner read 1-2-3 files and ran 1-2-3 macros by reproducing the command menus. Lotus sued. In Lotus v. Paperback (28 June 1990), the District of Massachusetts held that the 1-2-3 menu structure, including the choice and order of command words, was protected expression; VP-Planner was withdrawn.
Borland’s Quattro Pro offered a 1-2-3-compatible menu so that existing macros would run. In Lotus v. Borland, the First Circuit ruled on 9 March 1995 that the menu command hierarchy was an uncopyrightable “method of operation.” On 16 January 1996, with one justice recused, the Supreme Court split 4–4. Its affirmance left the First Circuit’s ruling in place but set no national precedent. The case is still cited in arguments over whether software interfaces and APIs can be copyrighted.
Current Relevance
1-2-3 is a historical product. IBM withdrew it from marketing in June 2013, along with SmartSuite and Organizer, and ended support on 30 September 2014 with no replacement. Its formats live on: LibreOffice and other suites can still open many .WKS, .WK1, .WK3 and .WK4 files. Excel still includes Lotus-compatibility settings, including a configurable menu key that defaults to the slash and “Transition formula evaluation,” which evaluates text and Boolean values the way 1-2-3 did.
The software has had a small revival among enthusiasts. In 2022 Tavis Ormandy recovered Lotus 1-2-3 for UNIX System V from old floppy images and relinked its original object file into a native Linux program, published as the 123elf project. No Docker image exists. Running 1-2-3 today means using the original DOS or Windows releases under an emulator, or using the Linux port with your own copy of the Unix disks.
Why It Matters
- It made end-user programming normal. Millions of people who would never have called themselves programmers built models in 1-2-3 formulas and automated them with macros. The spreadsheet formula is arguably the most widely used programming language in the world, and 1-2-3 is what put it on office desks.
- It set the conventions.
@SUM-style functions,A1references with$anchors, named ranges, the 1900 date serial and even the slash key survive in today’s spreadsheets, often for compatibility with 1-2-3 itself. - It showed how far a macro language can grow. In two releases, 1-2-3 macros went from recorded keystrokes to loops and subroutines. Later spreadsheet languages covered the same ground, with LotusScript eventually joining the macros inside 1-2-3 itself.
- It shaped software law. Lotus v. Borland is still a key case on whether a program’s command structure can be owned, and it began with a spreadsheet macro language that competitors had to imitate.
Timeline
Notable Uses & Legacy
IBM PC business adoption
1-2-3 was the IBM PC's first killer application; InfoWorld suggested clone makers advertise themselves as '1-2-3 compatible' rather than 'PC compatible', and running 1-2-3 became a standard test of whether a clone was truly compatible
Monsanto engineering calculations
Edward M. Rosen of Monsanto published Release 2.01 macro programs in Chemical Engineering Education (1990), including a general-purpose subroutine that solves one-dimensional equations by Wegstein's method, as an alternative to FORTRAN for process calculations
HP 95LX, 100LX and 200LX palmtops
Hewlett-Packard and Lotus built ports of 1-2-3 Release 2.2 and 2.4 into the ROM of HP's MS-DOS palmtop computers from 1991, giving users a pocket spreadsheet compatible with their desktop files
IBM mainframes (1-2-3/M)
1-2-3/M brought the same worksheet and command model to IBM 3270 terminals under VM/CMS and MVS, letting mainframe shops use the PC spreadsheet that their staff already knew
Microsoft Excel compatibility
Excel adopted 1-2-3's serial date system, including its deliberate treatment of 1900 as a leap year, and still ships 'Lotus compatibility' options such as the slash menu key and Transition formula evaluation so 1-2-3 worksheets calculate the same way