Gate Brace Calculator

Enter the gate width and height to get the diagonal brace length.

How it is calculated

The brace is the hypotenuse of a right triangle whose legs are the gate's width and height: brace = √(width² + height²). Enter both dimensions in the same unit (inches, centimetres, millimetres); the answer comes back as a bare number in that same unit, rounded to two decimals, with no unit label. Both values must be greater than zero. The figure is the straight-line distance between two opposite corners of the rectangle you describe, so measure the frame the way you want the brace to run: outer corner to outer corner gives the outer diagonal, while inside-edge to inside-edge measurements give the length between the rails. The tool does not subtract anything for mitred ends or overlap onto the posts.

Worked example

A gate frame is 36 inches wide and 72 inches tall. Square each side: 36² = 1296 and 72² = 5184. Add them: 1296 + 5184 = 6480. Take the square root: √6480 = 80.4984…, which the tool rounds to 80.50. So the diagonal brace needs to be about 80.5 inches long before you trim the angled ends to fit the corners.

Try this example →

Common mistakes

  • Mixing units, for example width in feet and height in inches. The formula squares each value, so the result is meaningless unless both use the same unit.
  • Using the opening size instead of the frame size. Measure the frame you will actually build or brace, not the gap between the posts.
  • Cutting the brace to exactly the displayed length. The number is the full corner-to-corner diagonal; a real brace is cut with angled ends and may fit between inside edges, so mark the angles first and trim to fit.
  • Treating the output as a length in inches when you typed centimetres. The result carries whichever unit you entered.

About this calculator

A rectangular gate frame racks (sags out of square) under its own weight unless a diagonal brace ties opposite corners together. That brace length is simple geometry — the Pythagorean theorem, brace = √(width² + height²) — since the brace, width, and height form a right triangle across the frame.

Carpenters, fence installers, and DIY builders use this to cut a diagonal 2x4 or steel tube to the exact length before installing it corner-to-corner, which is what keeps a wooden or metal gate hanging square for years instead of drooping on its hinges.

Was this helpful?

You can pick up to 3 reactions.

Comments (1)

  • Editorial team

    On a wooden gate, the usual advice is to run the brace from the bottom corner on the hinge side up to the top corner on the latch side, so it works in compression and stops the far end sagging. The tool only gives the straight-line length, so mark and cut the angles yourself. For a 1.2 by 1.8 frame the diagonal comes out at 2.16. How big is the gate you are building?

Popular calculators

All Calculators