Home / Science / Humanities and archaeology / Archaeology / Harris matrix builderTool #403

Harris matrix builder: stratigraphic sequence from context relations, with loop checks (free, in your browser)

Type or open your context relations (above, below, cuts, same as, contemporary with), find impossible loops and contradictions, drop redundant relations, and get a layered Harris matrix as SVG, PNG, PDF or CSV. Nothing is uploaded.

Keep it one tap away for everyday use.

Bookmark Harris matrix builder?

Press Ctrl + D now. Your browser opens its own bookmark box, where you choose the name and folder.

  1. Relations
  2. Check loops
  3. Reduce
  4. Matrix
Nothing is uploadedWorks offline once open

Contexts and relations

Write A above B when A is later (it covers, cuts, fills or seals B); A below B for the reverse. A same as B joins two numbers for one deposit. A contemporary with B puts two units on the same level without one being above the other. Short forms: >, <, =, ~. A spreadsheet with three columns (context, relation, context) works too. A line with a single number adds a context with no relations; text after # is ignored.

What it does

A Harris matrix shows the order in which the layers, cuts, fills and walls of a site were formed, latest at the top and earliest at the bottom. You record relations between pairs of contexts on site (“102 cuts 105”, “105 overlies 107”); this tool turns that list into the matrix and checks it:

  • Loops: if your records say A is above B, B above C and C above A, the sequence is impossible. The tool names each loop so you can find the wrong record.
  • Same as: contexts recorded under two numbers but known to be one deposit share a box. If one of them is also recorded above the other, you get a warning.
  • Contemporary with: two units formed at the same time are drawn on one level, joined by a dashed double line. If the rest of the sequence puts one above the other, the pair is flagged.
  • Redundant relations: if 5 is above 6 and 6 is above 7, then “5 above 7” is true but adds nothing. Harris’s rule is to draw only direct relations, so these are removed (a transitive reduction) and listed, with the chain that implies each.

How to use it

Write one relation per line, in plain words: above, over, overlies, covers, cuts, fills, seals or later than all mean the first context is later; below, under, cut by, filled by, covered by or earlier than mean it is earlier. Use same as (or =) and contemporary with (or ~). You can also open a CSV or Excel sheet with three columns: context, relation, context. A line with a single number adds a context that has no relations yet.

The matrix updates as you type. Download it as an SVG (vector, for editing or publication), a PNG, or a PDF or Word report with the lists. The two CSV files list every context (its level, what is directly above and below it) and every relation with its status (kept, redundant or contradicted) and the line it came from.

Worked example

Press Use the example (it also loads when the page opens). It has 15 made-up relations between 11 contexts. Contexts 8 and 9 are the same deposit, so there are 10 units. The tool reports 11 contexts in 10 units and 6 levels; 11 relations kept, 1 redundant. The redundant one is “5 above 7”, implied by 5 > 6 > 7. Contexts 3 and 4 are contemporary and sit side by side on level 3; context 11 is contemporary with 6 and is drawn level with it, although nothing else ties it there.

Now add a line “7 above 1”. The tool reports an impossible sequence and names the shortest loop: 1 above 2 above 3 above 5 above 7 above 1.

Tips

  • Keep the numbering as on your context sheets: any text without spaces works as a name (for example F12 or 1005a).
  • Phase and period groupings are not drawn; use the levels CSV in a spreadsheet to add them.
  • Large sites are fine: hundreds of contexts lay out in a second or two.

FAQ

Why is a level not a phase? Levels only place each unit one below the lowest unit above it. Units on the same level are not necessarily of the same date unless you record them as contemporary.

Is my site data uploaded? No. Everything runs in your browser, works offline, and nothing is kept after you close the page.

Where the numbers come from

  • Method: E. C. Harris, Principles of Archaeological Stratigraphy (2nd ed., 1989), for the matrix and its rules (only direct relations are drawn; same-as units share a box). Transitive reduction and layered drawing are standard graph methods (Aho, Garey and Ullman 1972; Sugiyama, Tagawa and Toda 1981).
  • Checked against the Python library networkx on 300 random graphs of up to 40 contexts: the same transitive reduction on every acyclic one, and every loop found on the 57 with loops.
  • The example contexts and relations are made up for this tool.

Standard scientific values, such as constants, atomic weights and melting points, are facts found in every textbook; we name where ours were checked. If you are an author or publisher and want a value, a credit or a table changed or removed, tell us and we will act quickly.

Last updated 2026-11-09.

Related tools

Phylogenetic tree viewer #177 Open a Newick or NEXUS tree file and draw it as a rectangular or circular tree, with branch lengths and support values. Reroot it at the midpoint or on any branch, ladderize, swap branches and colour groups. Download SVG, Newick, tip distances (CSV) or a report. Nothing is uploaded. Radiocarbon calibration #37 Turn a radiocarbon age (years BP ± error) into calendar dates with the IntCal20 curve. Get the 68.3 % and 95.4 % ranges in BC/AD or cal BP, the median, and plots of the probability and the curve. Publication plot maker #27 Paste columns or open a CSV or Excel file and get a clean scientific figure with error bars, sized for a journal column. Download vector SVG or PDF, or PNG at 300 or 600 dpi. Your data stays in your browser. Artefact measurement scale tool #404 Open a photo of a find with a scale bar in it, tap both ends of the bar and type its length, then measure lengths, edge angles and outline areas in millimetres. Includes a perspective check, click uncertainty, an annotated PNG and a CSV. The photo never leaves your device. Seriation and correspondence analysis #405 Paste or open a table of type counts per site, and get a correspondence analysis (inertia per axis, site and type scores, map), the sites and types ordered along the first axis, a battleship (frequency seriation) plot and the Brainerd-Robinson similarity matrix. Nothing is uploaded. Trench and grid recording sheet #406 Set up a site grid and a trench, then record finds, samples and levels by grid coordinates, tape offsets from a peg or a baseline, with heights from a level and staff. Get grid squares, latitude and longitude, a plan, a printable PDF sheet and a CSV. Your location is used only if you press the GPS button, and nothing is saved or sent. Dendrochronology cross-dating helper #410 Paste or open a dated master (Tucson .rwl or a year table) and an undated ring-width series, and slide one along the other: t-values after Baillie-Pilcher and Hollstein standardisation, Gleichläufigkeit with its significance, a best-matches table and an overlay plot. Nothing is uploaded.