Touch target spacing audit calculator

Calculate below supplied size criterion IDs and below supplied spacing pairs [ID,ID,gap px] with your own figures.

Your numbers

Use the units shown. Results update as you change valid inputs.

Use below supplied size criterion IDs and below supplied spacing pairs [ID,ID,gap px] to compare changes to your inputs. The method and limits below explain the scope.

Examples

Examples

Try the starting example

JSON Targets [ID,x px,y px,width px,height px]
[["A",0,0,30,30],["B",35,0,50,50]]
Supplied minimum width and height (px)
40
Supplied minimum edge gap (px)
8
Below supplied size criterion IDs
["A"]
Below supplied spacing pairs [ID,ID,gap px]
[["A","B",5]]

Try another scenario

JSON Targets [ID,x px,y px,width px,height px]
[["A",0,0,45,45],["B",55,0,50,50]]
Supplied minimum width and height (px)
40
Supplied minimum edge gap (px)
8
Below supplied size criterion IDs
[]
Below supplied spacing pairs [ID,ID,gap px]
[]
Calculation method

Calculation method

Below supplied size criterion IDs

Width<minimum or height<minimum.

Below supplied spacing pairs [ID,ID,gap px]

Euclidean distance between axis-aligned rectangle edges; gap zero for overlap/touch, compare strictly < minimum.

Symbols and units
a
JSON Targets [ID,x px,y px,width px,height px]
b
Supplied minimum width and height (px)
c
Supplied minimum edge gap (px)

Use the units shown. A list keeps the order in which you enter its values. The symbol ^ means “raised to the power of”.

Assumptions & limits

Assumptions & limits

  • Rectangle measurement audit under explicit criteria; this is not a complete accessibility compliance test. Units must be consistent CSS pixels, with no implicit device-pixel conversion. Supported limits: All numeric inputs must be finite. Only the explicitly described mathematical scenario is supported.
Are these inputs private?

These calculations run in your browser. A shared link contains the values you choose to share. Only questions submitted to the separate AI finder are sent to OpenAI.

Share this page
Share this calculator

Leave unchecked to share the page without your entered values.