# Rafter calculator

> How long is each rafter, and how many do you buy? Give it your walls and a pitch, and see the roof framed with every board’s length.

Page: https://hauscraft.app/calculators/rafter-calculator/

Run it through HausCraft's MCP server (https://hauscraft.app/mcp, streamable HTTP, no key): call `calculate` with

```json
{
  "calculator": "rafter-calculator",
  "values": {
    "width": 16,
    "length": 20,
    "pitch": 6,
    "overhang": 12,
    "oc": 24,
    "depth": 5.5
  }
}
```

A value left out is its start. `covered: true` shows it with roofing on. It answers with every piece and its size, and a 3D view where the client shows one.

| Key | What | Takes | Start |
|---|---|---|---|
| `width` | Building width | 6–40 ft | 16 |
| `length` | Building length | 6–60 ft | 20 |
| `pitch` | Pitch | 2–12 in 12 | 6 |
| `overhang` | Overhang | 6–24 in | 12 |
| `oc` | Spacing | 12 = 12 in on centre; 16 = 16 in on centre; 24 = 24 in on centre | 24 |
| `depth` | Rafters | 5.5 = 2×6; 7.25 = 2×8; 9.25 = 2×10 | 5.5 |

## How it is worked out

- Rafters run from each wall up to a ridge board along the peak, no further apart than the spacing you choose. The first stands just inside each end wall.
- Each rafter is notched to sit on the 2×4 plate on top of its wall, and runs on past the wall to the overhang.
- A sub-fascia closes the rafters’ ends along each eave. A barge rafter runs up each rake, carried on lookouts from the first rafter inside the wall.
- Each outside corner of the eaves has a short rafter at 45° from the corner in to the first rafter it meets.
- The gable ends are framed up to the roof in studs under a plate that follows the slope.
- Boards come up to 20 ft long. A rafter that would need to be longer, with no wall or beam under it to joint it over, is turned down, and we say why.

We lay out and count the sizes you pick, close enough to plan a weekend and price the lumber. Span tables, your local code and, on a bigger job, an engineer settle what size each board has to be.

## Questions

**How long is a rafter?** It depends on the half-width of the building, the pitch and the overhang. The list gives each rafter’s length as it is cut, from the ridge board to the end of the overhang.

**Does it cut the birdsmouth?** Yes. Each rafter is drawn notched over the plate it sits on, and its length is measured with the notch in it.

**Can it frame a hip roof?** It frames roofs whose shape is the same all the way along, such as gables, sheds, gambrels and saltboxes. A hip roof falls outside that.

## The MCP server

https://hauscraft.app/mcp: streamable HTTP, open, no key. It answers with every piece and its size, or why it can't be built; nothing is stored, and nothing is sized structurally.

Tools: `guide`, `list_calculators`, `calculate`, `build`.

An owner's own properties are there too, once they sign in to HausCraft on a monthly plan and allow the client (OAuth, asked for the first time one is needed): `list_properties`, `new_property`, `show_property` (the property in 3D as it stands), and each of a property's tools, `get_buildings` first, taking its id. A change is kept, and shown in the editor as it is made.

Claude Code: `claude mcp add --transport http hauscraft https://hauscraft.app/mcp`. Claude, ChatGPT and other clients: add it as a remote (custom) connector at that address.
