Tube Coping Calculator

This is a script for creating a cutting pattern for joining two round tubes.

There is another version of this script that should scale the page size to the pattern size. It may not work for everyone, so use at your own risk. Here's the link:

**For a stand-alone program that mostly does the same thing, see below.

Diameter 1
(cut tube)
Wall Thickness
(cut tube)
Diameter 2

Download pattern:

G Code
      pattern height: 3.14"

coping pattern

common sizes

Tube Gauge Decimal | Pipe-nom. Decimal Wall (sch 40)
10 .134 | 1/2 .840 .109
11 .120 | 3/4 1.050 .113
12 .109 | 1 1.315 .133
13 .095 | 1-1/4 1.660 .140
14 .083 | 1-1/2 1.900 .145
16 .065 | 2 2.375 .154
18 .049 | 2-1/2 2.85 .203
20 .035 | 3 3.500 .216

A few notes

If you try to enter a tube size that's over 10 inches in diameter (or under .1), you'll end up back at 1 inch. The reason for this is that the overall calculation gets too big to handle here, and PHP runs out of memory. The other problem is that the best way to print the pattern is in PDF format, and I haven't found an easy way to make the page oversize or tiled. So the best solution for doing larger tube sizes is to scale everything down and then blow it back up with your printer. Let me know if you think you can solve this problem better.

This script makes use of cookies (if you have them enabled) to store your most recent entries. This should save you some annoyance if you're using metric or if you happen close the window and then realize you just want to change the angle a couple of degrees.


This is a reconstruction and expansion of Eric Fahlgren's clever "miter" program written in 1994 to help in building bicycle frames.

The PDF version seems to scale best without regard for browser or OS weirdness. Make sure you have "none" selected under "page scaling" in the Acrobat print dialog or your pattern may come out just wrong enough that the problem won't be obvious until you try to wrap it around the tube.

The PDF is converted from a simple postscript file with ImageMagick. The scale seems to be pretty good either printed or imported into something like Adobe Illustrator.

If you have kudos, complaints, or pictures of things you've made with this that you'd like to share, just let me know. If I get enough interesting pictures, I'll put up gallery (with credits, if you'd like).

Some Explanation

In case it's not entirely obvious, the point of this thing is to create a cutting pattern for a tube or a pipe to accurately fit it at an angle to another tube or pipe so that you can weld or braze it. This is a whole lot easier than eyeballing the cut and scribing it by hand, and if you do it right, both the grinding and welding are pretty easy. This process is also frequently called "tube notching" or "pipe notching". Apparently, this script/form/PHP widget has become popular with a number of hot-rod, off-road, and vehicle modding freaks engineers.

"Offset" is the distance between the two axes of the tubes. In other words, it moves one tube sideways in relation to the other tube. If you try to join two 1" diameter tubes and specify an offset of 1", then the coping pattern will be completely flat, because the tubes won't intersect. Although I thought that wouldn't be useful, Jurgen Schulz wrote to tell me that you could take advantage of that trick to miter a tube to a flat surface.

Specifying the tube's wall thickness makes the cut fit to the inside diameter of the tube, which makes it easier to fit, and makes a nice notch for welding. If you're trying to get a really snug fit, like for brazing a bicycle frame, you might want to try selecting a rather small number for the tube thickness. But if you get carried away with making it perfect, you'll spend a lot more time grinding it down.

Sometimes, I find I need to specify a wall thickness that's actually a tad smaller than it is in reality. I don't know if this is because of my sloppy grinder work, or my sloppy math. Some experimentation may be necessary to get it just right, depending on you own techniques.

For really big pipe, you might want to use a cutting torch, but most of the time I just use a chop saw to get it close and then an angle grinder to finish it up.

Can you give me a stand-alone version of this so I can run it on my laptop out in the shed where there aren't any internets?

No. I'm not really a programmer and writing this whole thing from the ground up is just too much for this busy old geezer to take on right now. Web scripting simple. Actual programming hard. Just thinking about it makes me want to take a nap. And another nap.

If you're a real geek, you could always just set up a web server with PHP and ImageMagick on your own computer and just run it yourself. But if you were a real geek, you'd already have wi-fi in your shed, so you wouldn't care.

Update on the stand-alone program thing:

Dan Hopper has written a little DOS program that's slightly similar to the coping calculator. You can check it out here.

Notes on the input fields

To keep the server healthy, I've set the following limits:

Tube diameter: .1" minimum, 10" maximum (2 / 200mm)
Wall thickness must be greater than zero
Minimum angle 10 degrees
Maximum angle 90 degrees

It usually works best to set the wall thickness a little smaller than actual, or the fit may be too loose. This depends on your grinding and welding style. If you want to cut the pattern at 0" thickness (the theoretical OD), just see this, and note the difference between .01" and .0001" on the image at the bottom of the post. Most of that would be thinner than aluminum foil. And that's still not 0".

You may also have to set the tube size a little fatter because tube is frequently oversized or irregular. If you're using heavy paper, this also adds a little to the size.

If you've been paying attention, this will sound repetitive, but before you complain to me about the size being wrong, make sure you have "none" selected under "page scaling" in the Acrobat print dialog.

Even more notes

Russell asked me to add some more notes for newbies:
Mark a reference line down the tube (both ends), then use the grinder to cut the pattern after tracing with a silver pencil. The silver pencil shows up really well on the black mill finish on 4130 tubing. I then grind until the pencil mark is just a hairline all the way around.

I like to use a silver Sharpie, because I'm old and can't see pencil lines without coke bottle glasses. If you're doing mass production, make the pattern a little oversize from card stock and mark the tube with white auto primer spray paint. It dries fast and resists heat.

My usual process is to rough-cut the pattern free-hand on a 14" abrasive saw, and then finish it up with a 4-1/2" flap disk. I've been buyiing those from Lehigh Valley Abrasives lately, because they're dirt cheap and I go through them like popcorn. And no, they aren't paying me.


If you feel so inclined, you can help me pay for the web hosting of this site right here.