A planner hands you seven print job cards on a Sunday night and asks for Monday's run order on the screen-printing table and the curing oven behind it. You could run them in the order they arrived. You could run the shortest jobs first because that feels responsible. Neither is optimal, and on a seven-job lot the gap between your gut-feel order and the best possible order is often two to three hours of oven time you did not need to burn.

That gap compounds. A curing oven idling between jobs still draws gas or electricity. A printing table sitting idle while the oven clears a long job is a table you paid a helper to stand at doing nothing. Multiply one bad sequencing call by fifty print days a season and you have burned a real number of labour-hours and utility cost on a problem that has an exact, provably optimal solution.

That solution is Johnson's rule. It applies whenever work moves through exactly two stages in a fixed order (print then cure, fuse then press, any two-machine flow shop) and it finds the sequence that minimises total makespan, not an approximation of it. This article gives you the algorithm as four numbered steps, a full seven-job worked example with a makespan table, and, because most guides stop short here, the four situations on an apparel floor where Johnson's rule quietly stops being the right tool.

Everything below assumes you already have accurate per-job, per-machine processing times: if you do not, that is a standard minute value calculation to sort out first, not a sequencing one.

What Problem Does Johnson's Rule Actually Solve?

The two-machine flow shop sequencing problem is narrow and specific. Every job in the batch must be processed on machine 1 first, then machine 2, in that fixed order: no job skips a stage and no job reverses the order. You know each job's processing time on each machine in advance, and those times do not change once the sequence starts.

The objective is makespan: the total elapsed time from when the first job starts on machine 1 to when the last job finishes on machine 2. Johnson's rule finds the job sequence (the same sequence on both machines) that makes that number as small as possible.

This is not a heuristic that usually works well. It is a mathematically proven optimum for this exact problem shape. The catch is the phrase "this exact problem shape": stray outside it and the guarantee disappears, which is the entire second half of this article.

Johnson's Rule, Step by Step

The algorithm is short enough to run by hand on a whiteboard for up to ten or twelve jobs. Beyond that, do it in a spreadsheet, but the logic never changes.

  1. List every job with two numbers: its processing time on machine 1 and its processing time on machine 2.

  2. Scan the entire list for the single smallest processing time, wherever it falls, on either machine, for any job.

  3. Place that job based on which machine the minimum was on. If the smallest time is on machine 1, schedule that job into the earliest open position in the sequence. If the smallest time is on machine 2, schedule it into the latest open position.

  4. Remove that job from the list and repeat steps 2 and 3 against the jobs that remain, filling positions inward from both ends until every job has a place.

Ties are broken arbitrarily: when the smallest value appears on both machines for different jobs, or twice on the same machine, either resolution gives an equally optimal makespan. What matters is the direction of the rule: a fast first-stage job earns an early slot, a fast second-stage job earns a late slot, because the goal in both cases is to stop that machine from sitting idle waiting on its partner.

Worked Example: Sequencing Seven Print-and-Cure Jobs

Take a real Monday lot: seven print jobs, each needing a pass on the screen-printing table (machine 1) and then a pass through the curing oven (machine 2), in minutes.

Job

Print (min)

Cure (min)

J1

12

10

J2

8

18

J3

15

7

J4

6

22

J5

20

5

J6

9

16

J7

14

11

Optimal sequence: J4, J2, J6, J7, J1, J3, J5. J5's cure time of 5 is the smallest value overall, so it goes last; J4's print time of 6 is next smallest, so it goes first; and so on inward from both ends.

Now build the makespan table. Each machine starts a job the moment it is free and the job has arrived from the previous stage:

Job

Print start

Print end

Cure start

Cure end

J4

0

6

6

28

J2

6

14

28

46

J6

14

23

46

62

J7

23

37

62

73

J1

37

49

73

83

J3

49

64

83

90

J5

64

84

90

95

Total makespan: 95 minutes, with the curing oven running back-to-back from minute 6 to minute 95 without a single idle gap. Run the same seven jobs in arrival order or shortest-job-first and you will find gaps open up on the oven line whenever a short print job clears the table faster than the oven can absorb it. This ordering is specifically what prevents those gaps.

Field note: A finishing unit running eleven embellishment styles a day switched from a first-come sequence to this method on its print-and-cure pair and measured oven idle time drop from roughly 40 minutes to under 8 minutes per shift. Over a six-day week that recovered close to three hours of oven capacity, enough to absorb one extra rush order without overtime.

When Does Johnson's Rule Not Apply?

This is the section most references skip, and it is the one that will save you from misapplying an exact-optimum algorithm to a problem it was never built for.

More Than Two Machines

Johnson's rule is proven for exactly two machines. It does not generalise cleanly to three, four, or more stages. A limited three-machine extension exists, but only when one stage is provably dominated by its neighbours. Outside that narrow condition, a general flow shop with three or more stages has no exact hand-computable rule at all, and you are into dispatching heuristics or an optimisation solve.

This matters directly for sewing lines. A sewing line is rarely a true two-machine flow shop. A single garment might pass through eight, twelve, or thirty operations across as many machines. This algorithm cannot sequence that line; it was never designed to. For a line that size, an approach like linear programming for sewing line balancing is the right tool instead.

Sequence-Dependent Setup Times

The algorithm assumes each job's processing time on a machine is fixed regardless of which job ran before it. The moment setup time depends on the previous job, such as a colour change on the printing table or a needle or thread change between styles, that assumption breaks. A sequence that looks optimal on processing time alone can be badly sub-optimal once you add fifteen minutes of changeover between every dissimilar job pair.

No In-Process Storage Between Stages (Blocking)

The algorithm assumes a completed job can wait indefinitely between machine 1 and machine 2 with no penalty, effectively infinite buffer space. Cutting-to-sewing handoffs in apparel usually do have that buffer, often managed explicitly with a kanban pull system between cutting and sewing. But a curing oven fed directly off a printing table on a tight conveyor, a fusing press feeding straight into an inline inspection point, or any layout where a finished piece cannot be set down and must move immediately to stage two: that is a blocking flow shop, and the optimality guarantee no longer holds without modification.

Makespan Is Not the Right Objective

This method optimises one number: total completion time for the batch. It says nothing about individual due dates. If three of your seven jobs ship today and four ship next week, the makespan-optimal sequence can still finish today's urgent jobs last, perfectly minimising total time while missing every commitment that actually matters to the customer. When orders are due-date-driven, the right question is not "what minimises makespan" but "what minimises lateness," and that calls for earliest-due-date or critical-ratio dispatching instead.

Johnson's Rule vs. the Alternatives: A Quick Reference

Situation

Use Johnson's rule?

What to use instead

Exactly 2 machines, fixed order, unlimited buffer between them

Yes: exact optimum

N/A

3+ machines, no dominance condition met

No

Dispatching heuristics, simulation, or an optimisation solve

Sequence-dependent setup/changeover times

No

Setup-aware sequencing / changeover-minimising heuristics

No buffer between stages (blocking)

Not without modification

Blocking flow-shop methods

Hard due dates, tardiness matters more than total time

No

Earliest due date (EDD) or critical ratio dispatching

Processing times uncertain or variable

No

Buffer sizing via queuing theory for buffer sizing, safety stock between stages

Final Word

Johnson's rule is one of the few places in production planning where you get a mathematically exact answer for free, and it is worth using every time your problem genuinely fits its shape: two stages, fixed order, real buffer between them. The discipline is knowing when to stop trusting it, because a sewing line with thirty operations, a printing table with heavy colour-change setups, or an order book driven by ship dates are three completely different problems wearing the same "sequencing" label. Solve the right one.