Five measurements, taken before you order rather than after the box arrives, cover every failure mode in this guide:
1. Depth of the shelf or counter run
Measure from the front edge of the counter or shelf straight back to the wall or backsplash, at the exact spot the machine will sit. If that number is less than the model's stated depth, the machine will either overhang the front edge or need to sit further back than the water inlet and drain hoses reach.
2. Width of the run, including anything beside it
Measure side to side, and subtract a couple of inches if a cabinet door, a drawer pull, or an appliance beside the spot needs room to open without hitting the dishwasher's casing.
3. Vertical clearance to the underside of the wall cabinet, closed
Measure straight up from the counter surface to the bottom of the cabinet above. Compare this against the machine's closed height — this is the 18-to-20-inch static-fit number most general advice quotes, and it only tells you whether the box fits at rest.
4. Vertical clearance with the lid or door at full open swing
This is the number most listings skip and the one the AIRMSEN Large Slim's 23.5-inch tip is addressing. If the machine has a tank you refill by hand, measure (or ask the seller for) how far the lid needs to swing open, add that to the counter height, and compare the total against your cabinet clearance — not the closed-box height.
5. Distance to the sink, for the drain hose
Countertop machines pump waste water out through a hose hooked over the sink edge, and that hose has a fixed length. A spot that passes every depth and height check but sits too far from the sink still fails. The full mechanics of this — hose length, hook height, and what happens if the run is too long — are covered in where a portable dishwasher's drain hose actually goes.
A cardboard mock-up — a box cut to the stated width, depth and height, taped shut and set in the actual spot — remains the single most reliable way to catch a problem before the real machine arrives, especially for the lid-swing clearance in step 4, which is easy to get wrong from a tape measure alone.