Room Layout Optimizer

Auto-arrange furniture in a room around doors, windows and a clear walkway.

cm
cm
cm

Positions snap to this grid; furniture sizes are rounded up to it.

Furniture (required)

Width = side along its back; depth = front to back. Clearance = free space needed in front (to open drawers, get into bed, sit).

Furniture
#NameWidth (cm)Depth (cm)Back against wallClearance in front (cm)Prefer near window
1cmcmcm
2cmcmcm
3cmcmcm
4cmcmcm
5cmcmcm
More options
cm
Doors and windows

Offset is measured along the wall from its west end (north/south walls) or north end (east/west walls).

Doors and windows
#TypeWallOffset (cm)Width (cm)
1cmcm
2cmcm
3cmcm

Try an example: ·

More about this tool

Part of Hearth Home, travel & daily life

How it works

Give the room size, doors, windows and your furniture with the clearance each piece needs. A deterministic grid search places everything inside the room without overlaps, keeps door swings and a walkway clear, prefers walls and windows where requested and returns coordinates plus a text floor plan.

  • The room is rasterised into grid cells (default 10 cm); furniture sizes, clearances and door zones are rounded up to whole cells, the room size down.
  • Each door gets a keep-clear square (door width × door width) inside the room in front of it, approximating the quarter-circle swing.
  • Each item can face any of the 4 directions; its body must lie inside the room and not overlap other bodies, other clearance zones or door squares; its front clearance zone must lie inside the room and not overlap bodies. "Back against wall" items must touch the wall behind them.
  • Walkway: the free floor is eroded by a square of the walkway width; squares connected to a door square form the reachable walkway. Every item’s clearance zone (or the cell strip in front of it) must touch that walkway.
  • Search: items are placed largest-area first with a beam search (4 partial layouts kept). For each layout, every valid grid position is pre-scored (wall hugging, corner use, distance to the nearest window for "prefer near window" items); the 25 best are checked for walkway access and scored.
  • Score = 1000 × items placed + 10 × reachable walkway m² + 2 per wall item in a corner − 3 × distance (m) of free-standing items from the nearest wall − 5 × distance (m) from window-loving items to the nearest window. Ties break by input order, then north-to-south, west-to-east position.

Rectangles only; radiators, sockets, sloped ceilings and personal taste are not considered. Treat the result as a starting point.

Use this tool in an app

These free programs for your browser have this tool built in, next to everything else the task needs.

  • Hearth Home & travel planner

    Plan meals, chores, home care, moves, trips and good days for your household in one place.

    Open Hearth

Related tools

  • Will It Fit? – Check if a sofa, wardrobe or box fits through doors, corners, stairs and lifts.
  • Moving Box Planner – How many moving boxes, how much tape, which truck and when to start packing.

How to use the Room Layout Optimizer

Find a furniture layout that fits, keeps the door swing and a walkway clear, with coordinates and a text floor plan.

What it is for

Before you drag a bed around three times or buy a wardrobe that blocks the door, check whether everything fits — with space to open drawers and walk through. This tool takes the room's width and depth, the doors and windows, and each piece of furniture with the clearance it needs in front, then searches for a layout that fits without overlaps, keeps every door's swing clear and leaves a connected walkway to every piece.

It thinks in rectangles on a grid and knows nothing about radiators, sockets or sloped ceilings. Treat the result as proof that a layout exists and a starting point for your own tweaks.

Worked example

A bedroom of 400 × 350 cm with a 60 cm walkway. A door on the south wall (20 cm from its west end, 80 cm wide) and a window on the north wall (150 cm from the west end, 120 cm wide). Furniture: a 160 × 200 double bed against a wall with 60 cm clearance, a 150 × 60 wardrobe against a wall with 70 cm, and a 120 × 60 desk against a wall with 70 cm, preferably near the window.

Result: 3 / 3 items placed, with 9.18 m² of reachable walkway:

Worked example
PlanItemx (cm)y (cm)Size W→E × N→SFront facesAgainst wall
ADouble bed00160 × 200southnorth
CDesk1600120 × 60southnorth
BWardrobe34020060 × 150westeast

The bed sits in the north-west corner, the desk next to it under the window, and the wardrobe on the east wall facing into the room. The door swing (bottom left) stays free.

How to read the result

  • Items placed is the key number. If anything is missing, the room can't hold everything with the clearances you gave.
  • Reachable walkway is the floor area you can actually walk to from a door. If it is lower than Free floor, some space is cut off behind furniture.
  • x / y are measured from the north-west corner to the item's corner; Size W→E × N→S is the footprint after rotation (the wardrobe is turned, so it reads 60 × 150).
  • In the floor plan, letters are furniture, # doors, = windows, / door swing and . reachable walkway. One character is one grid cell (10 cm by default).

Tips and common mistakes

  • Width is the side along the item's back, depth is front to back.
  • Opening offsets are measured from the west end of north/south walls and from the north end of east/west walls.
  • Clearance is space in front only. Bedside access on the sides of a bed isn't modelled, so check that yourself on the plan.
  • The tool doesn't know relationships between pieces. In a living-room test it put the sofa against the north wall and the TV unit on the west wall — valid, but not facing each other. Rearrange such pairs by hand.
  • Sizes are rounded up to the grid and the room rounded down, so with a 10 cm grid you may lose a few centimetres. Use a 5 cm grid for tight rooms.
  • If an item won't fit, try a smaller clearance or walkway before giving up on it.

FAQ

Does it handle L-shaped rooms?

No. It works with rectangular rooms only. As a rough workaround, describe the bounding rectangle and add a wall-backed dummy item where the missing corner is — check on the plan that it really blocks that area.

Why is a piece standing away from the wall?

Items without "Back against wall" may be free-standing; the score only nudges them toward walls and toward windows if you ask for that.

Will it find the best layout?

It finds a good valid layout with a deterministic search. It is not exhaustive; other arrangements may fit too.

Guide last updated:

For scripts and AI agents

  • JSON API: POST https://roomlayoutoptimizer.usefulweb.site/api/v1/calculate (same calculation as this page)
  • Interface description: OpenAPI 3.1 · AI guide: llms.txt
  • MCP server (Streamable HTTP): https://roomlayoutoptimizer.usefulweb.site/mcp · tool name room_layout_optimizer
Example request
curl -s -X POST https://roomlayoutoptimizer.usefulweb.site/api/v1/calculate \
  -H 'content-type: application/json' \
  -d '{"roomWidth":400,"roomDepth":350,"gridCm":10,"walkwayCm":60,"openings":[{"kind":"door","wall":"south","offset":20,"width":80},{"kind":"window","wall":"north","offset":150,"width":120}],"furniture":[{"name":"Double bed","width":160,"depth":200,"needsWall":true,"clearanceFront":60,"nearWindow":false},{"name":"Wardrobe","width":150,"depth":60,"needsWall":true,"clearanceFront":70,"nearWindow":false},{"name":"Desk","width":120,"depth":60,"needsWall":true,"clearanceFront":70,"nearWindow":true}]}'
Feedback · ideas & bug reports welcome