All online tools use javascript to calculate the dimensions. Use at your own risk. If the answers look wrong
then verify the answers with a calculator.
This octagon bay window rafter script - calculator will return the octagon baywindow geometry angles and trigonometry rafter
measurements for a Joe Carola type of baywindow roof framing with offset bay hips and dog leg valleys. The script
is limited to 45° baywindow calculations. The plate line must meet at 45° at the two intersecting corners.
The span is taken at the intersecting 45° walls to the main building plate
line. The span for the common rafters is the typical: span = side projection
* 2 + the face wall length.
The front face wall common rafter run is then calculated as: face wall common
rafter run = span / 2. The front pitch of the baywindow is calculated at
the same pitch of the side common rafters.
To calculate the front bay hips the script uses face wall common rafter run
+ overhang run, so that all calculations for the bay hips are from the fascia
line. The bay hips are not at 67.5° from the corners of the baywindow.
The bay hips are offset from the corners of the baywindow to keep the overhang
run equal on all sides of the baywindow. With this type of baywindow roof
framing the 4 bay hips are NOT all at the same pitch and are NOT the
same length. The valleys are running at a 45° to the main wall lines, with
two dog leg valleys connecting the valleys to the fascia line. The 45° side
wall king common is in the center of the 45° wall, but not in the center
of the overhang fascia.
These six geometry angles for the bay hip are greatly effected by the side
pitch, bay projection length, face wall length and overhang run. Just by
changing the overhang run from 12" to 18" will drastically change the geometry
angles for the bay hip.
- Bay Hip Rafter Run Bisect Angle
- Bay Hip Rafter Run Top Bisect Angle
- Bay Hip Rafter Run Adjacent Bisect Angle
- Bay Hip Rafter Run Top Adjacent Bisect Angle
- Wall Bay Hip Rafter Run Bisect Angle
- Wall Bay Hip Rafter Top Bisect Angle
To calculate the wall bay hip rafter run bisect angle we can use the hypotenuse of a right triangle:
wall bay hip rafter run = hypot( common run , common run - projection )
wall bay hip rafter run bisect angle = 135° - arctan ( common run ÷ (common run - projection) )
To calculate the 45° wall common rafter angle we can use the hypotenuse of a right triangle:
45° wall common rafter run to fascia = overhang + (sin ( wall bay hip rafter run bisect angle ) × wall bay hip rafter run )
45° wall common rafter angle = arctan ( common rafter rise from fascia ÷ 45° wall king common run to fascia )

joe-carola-baywindow.dxf -- auto generated DXF CAD file of baywindow drawing each time script is run
joe-carola-baywindow.pl source code for perl script that generates these baywindow calculations
dxf_header.txt DXF header text file used by this script