Thin-wall cylinder under pressure
Hoop and lengthwise stress in a closed cylinder with internal pressure. Holds when the wall is no more than a tenth of the inside radius.
hoop = p r / t, lengthwise = p r / (2 t), r = inside radius
Nothing matches that. Try another word, or clear the box to see the subjects.
10 tools
Tap drills, drill sizes, clearance holes, decimal equivalents, gauges and keys.
29 tools
Speeds and feeds, bolt circles, sine bars, weights, threads, tap drills and fits.
11 tools
Triangles, circles, chords, polygons, areas and volumes.
22 tools
Pressure vessels, beams, shafts, columns, stress, springs, gears and bearings.
29 tools
The energy in light, motion and electricity, and Bernoulli's equation with the rest of the fluid and air tools.
14 tools
Two-stroke oil to gas mix, displacement, compression ratio, gearing, tire size and more.
8 tools
Molar mass, the mol calculator, molarity, dilution, balancing and stoichiometry.
25 tools
Dosage math, ECMO flow, and a medication lookup that opens the official label. Math aids only, not medical advice.
24 tools
G-code and M-code lists, custom macro commands, and quick references for Python, C and C++, JavaScript, Java, C#, SQL, the command line, Git, HTML and CSS.
25 tools
Pace and split times, cross country team scoring, the RPE calculator and workout math, and the stats behind a box score.
19 tools
Length, area, volume, weight, force and thrust, pressure, torque, energy, power, speed, flow, temperature and more.
The standard drill nearest 75 percent of full thread for each Unified coarse and fine thread, and the percent of thread that drill really leaves. In tough material a drill one size larger is common.
Show the chart| Thread | Series | Major diameter, in | Tap drill | Drill, in | Drill, mm | Thread left |
|---|---|---|---|---|---|---|
| #0-80 | UNF | 0.0600 | 3/64 | 0.0469 | 1.19 | 81% |
| #1-64 | UNC | 0.0730 | #53 | 0.0595 | 1.51 | 67% |
| #1-72 | UNF | 0.0730 | #53 | 0.0595 | 1.51 | 75% |
| #2-56 | UNC | 0.0860 | #50 | 0.0700 | 1.78 | 69% |
| #2-64 | UNF | 0.0860 | #50 | 0.0700 | 1.78 | 79% |
| #3-48 | UNC | 0.0990 | #47 | 0.0785 | 1.99 | 76% |
| #3-56 | UNF | 0.0990 | #45 | 0.0820 | 2.08 | 73% |
| #4-40 | UNC | 0.1120 | #43 | 0.0890 | 2.26 | 71% |
| #4-48 | UNF | 0.1120 | #42 | 0.0935 | 2.37 | 68% |
| #5-40 | UNC | 0.1250 | #38 | 0.1015 | 2.58 | 72% |
| #5-44 | UNF | 0.1250 | #37 | 0.1040 | 2.64 | 71% |
| #6-32 | UNC | 0.1380 | #36 | 0.1065 | 2.71 | 78% |
| #6-40 | UNF | 0.1380 | #33 | 0.1130 | 2.87 | 77% |
| #8-32 | UNC | 0.1640 | #29 | 0.1360 | 3.45 | 69% |
| #8-36 | UNF | 0.1640 | #29 | 0.1360 | 3.45 | 78% |
| #10-24 | UNC | 0.1900 | #25 | 0.1495 | 3.80 | 75% |
| #10-32 | UNF | 0.1900 | #21 | 0.1590 | 4.04 | 76% |
| #12-24 | UNC | 0.2160 | #16 | 0.1770 | 4.50 | 72% |
| #12-28 | UNF | 0.2160 | #14 | 0.1820 | 4.62 | 73% |
| 1/4-20 | UNC | 0.2500 | #7 | 0.2010 | 5.11 | 75% |
| 1/4-28 | UNF | 0.2500 | #3 | 0.2130 | 5.41 | 80% |
| 5/16-18 | UNC | 0.3125 | F | 0.2570 | 6.53 | 77% |
| 5/16-24 | UNF | 0.3125 | I | 0.2720 | 6.91 | 75% |
| 3/8-16 | UNC | 0.3750 | 5/16 | 0.3125 | 7.94 | 77% |
| 3/8-24 | UNF | 0.3750 | Q | 0.3320 | 8.43 | 79% |
| 7/16-14 | UNC | 0.4375 | U | 0.3680 | 9.35 | 75% |
| 7/16-20 | UNF | 0.4375 | 25/64 | 0.3906 | 9.92 | 72% |
| 1/2-13 | UNC | 0.5000 | 27/64 | 0.4219 | 10.72 | 78% |
| 1/2-20 | UNF | 0.5000 | 29/64 | 0.4531 | 11.51 | 72% |
| 9/16-12 | UNC | 0.5625 | 31/64 | 0.4844 | 12.30 | 72% |
| 9/16-18 | UNF | 0.5625 | 33/64 | 0.5156 | 13.10 | 65% |
| 5/8-11 | UNC | 0.6250 | 17/32 | 0.5313 | 13.49 | 79% |
| 5/8-18 | UNF | 0.6250 | 37/64 | 0.5781 | 14.68 | 65% |
| 3/4-10 | UNC | 0.7500 | 21/32 | 0.6563 | 16.67 | 72% |
| 3/4-16 | UNF | 0.7500 | 11/16 | 0.6875 | 17.46 | 77% |
| 7/8-9 | UNC | 0.8750 | 49/64 | 0.7656 | 19.45 | 76% |
| 7/8-14 | UNF | 0.8750 | 13/16 | 0.8125 | 20.64 | 67% |
| 1-8 | UNC | 1.0000 | 7/8 | 0.8750 | 22.22 | 77% |
| 1-12 | UNF | 1.0000 | 59/64 | 0.9219 | 23.42 | 72% |
The usual tap drill for metric coarse and fine threads: the diameter less the pitch, which leaves about three quarters of full thread.
Show the chart| Thread | Series | Pitch, mm | Tap drill, mm | Tap drill, in |
|---|---|---|---|---|
| M1.6 x 0.35 | coarse | 0.35 | 1.25 | 0.0492 |
| M2 x 0.4 | coarse | 0.40 | 1.60 | 0.0630 |
| M2.5 x 0.45 | coarse | 0.45 | 2.05 | 0.0807 |
| M3 x 0.5 | coarse | 0.50 | 2.50 | 0.0984 |
| M4 x 0.7 | coarse | 0.70 | 3.30 | 0.1299 |
| M5 x 0.8 | coarse | 0.80 | 4.20 | 0.1654 |
| M6 x 1 | coarse | 1.00 | 5.00 | 0.1969 |
| M8 x 1.25 | coarse | 1.25 | 6.75 | 0.2657 |
| M8 x 1 | fine | 1.00 | 7.00 | 0.2756 |
| M10 x 1.5 | coarse | 1.50 | 8.50 | 0.3346 |
| M10 x 1.25 | fine | 1.25 | 8.75 | 0.3445 |
| M10 x 1 | fine | 1.00 | 9.00 | 0.3543 |
| M12 x 1.75 | coarse | 1.75 | 10.25 | 0.4035 |
| M12 x 1.5 | fine | 1.50 | 10.50 | 0.4134 |
| M12 x 1.25 | fine | 1.25 | 10.75 | 0.4232 |
| M14 x 2 | coarse | 2.00 | 12.00 | 0.4724 |
| M14 x 1.5 | fine | 1.50 | 12.50 | 0.4921 |
| M16 x 2 | coarse | 2.00 | 14.00 | 0.5512 |
| M16 x 1.5 | fine | 1.50 | 14.50 | 0.5709 |
| M18 x 2.5 | coarse | 2.50 | 15.50 | 0.6102 |
| M20 x 2.5 | coarse | 2.50 | 17.50 | 0.6890 |
| M20 x 1.5 | fine | 1.50 | 18.50 | 0.7283 |
| M24 x 3 | coarse | 3.00 | 21.00 | 0.8268 |
Drill sizes for a screw to pass through. Close fit when parts are located by the screws; free fit for easy assembly.
Show the chart| Screw | Screw diameter, in | Close fit | Free fit |
|---|---|---|---|
| 1 | 1.0000 | 1-1/64 (1.0156) | 1-1/32 (1.0313) |
| #0 | 0.0600 | #52 (0.0635) | #50 (0.0700) |
| #1 | 0.0730 | #48 (0.0760) | #46 (0.0810) |
| #2 | 0.0860 | #43 (0.0890) | #41 (0.0960) |
| #3 | 0.0990 | #37 (0.1040) | #35 (0.1100) |
| #4 | 0.1120 | #32 (0.1160) | #30 (0.1285) |
| #5 | 0.1250 | #30 (0.1285) | #29 (0.1360) |
| #6 | 0.1380 | #27 (0.1440) | #25 (0.1495) |
| #8 | 0.1640 | #18 (0.1695) | #16 (0.1770) |
| #10 | 0.1900 | #9 (0.1960) | #7 (0.2010) |
| #12 | 0.2160 | #2 (0.2210) | #1 (0.2280) |
| 1/4 | 0.2500 | F (0.2570) | H (0.2660) |
| 5/16 | 0.3125 | P (0.3230) | Q (0.3320) |
| 3/8 | 0.3750 | W (0.3860) | X (0.3970) |
| 7/16 | 0.4375 | 29/64 (0.4531) | 15/32 (0.4688) |
| 1/2 | 0.5000 | 33/64 (0.5156) | 17/32 (0.5313) |
| 5/8 | 0.6250 | 41/64 (0.6406) | 21/32 (0.6563) |
| 3/4 | 0.7500 | 49/64 (0.7656) | 25/32 (0.7813) |
| 7/8 | 0.8750 | 57/64 (0.8906) | 29/32 (0.9063) |
Medium-fit clearance holes for metric screws.
Show the chart| Screw | Clearance hole, mm | Clearance hole, in |
|---|---|---|
| M2 | 2.4 | 0.0945 |
| M2.5 | 2.9 | 0.1142 |
| M3 | 3.4 | 0.1339 |
| M4 | 4.5 | 0.1772 |
| M5 | 5.5 | 0.2165 |
| M6 | 6.6 | 0.2598 |
| M8 | 9.0 | 0.3543 |
| M10 | 11.0 | 0.4331 |
| M12 | 13.5 | 0.5315 |
| M16 | 17.5 | 0.6890 |
| M20 | 22.0 | 0.8661 |
| M24 | 26.0 | 1.0236 |
Counterbore diameter and depth to sink the head of a socket head cap screw flush. The head is as tall as the screw's diameter.
Show the chart| Screw | Head diameter, in | Counterbore diameter | Counterbore depth, in |
|---|---|---|---|
| #4 | 0.1830 | 7/32 (0.2188) | 0.1120 |
| #6 | 0.2260 | 9/32 (0.2813) | 0.1380 |
| #8 | 0.2700 | 5/16 (0.3125) | 0.1640 |
| #10 | 0.3120 | 3/8 (0.3750) | 0.1900 |
| 1/4 | 0.3750 | 7/16 (0.4375) | 0.2500 |
| 5/16 | 0.4690 | 17/32 (0.5313) | 0.3125 |
| 3/8 | 0.5620 | 5/8 (0.6250) | 0.3750 |
| 1/2 | 0.7500 | 13/16 (0.8125) | 0.5000 |
| 5/8 | 0.9380 | 1 (1.0000) | 0.6250 |
| 3/4 | 1.1250 | 1-3/16 (1.1875) | 0.7500 |
Tap drills for American taper pipe threads, drilled without reaming.
Show the chart| Pipe size | Threads per inch | Tap drill | Drill, in |
|---|---|---|---|
| 1/16 | 27 | D | 0.2460 |
| 1/8 | 27 | R | 0.3390 |
| 1/4 | 18 | 7/16 | 0.4375 |
| 3/8 | 18 | 37/64 | 0.5781 |
| 1/2 | 14 | 23/32 | 0.7188 |
| 3/4 | 14 | 59/64 | 0.9219 |
| 1 | 11.5 | 1-5/32 | 1.1563 |
Every standard inch drill up to 1/2 inch in order of size, with its decimal and metric size.
Show the chart| Drill | Kind | Inches | Millimeters |
|---|---|---|---|
| #80 | Number | 0.0135 | 0.34 |
| #79 | Number | 0.0145 | 0.37 |
| 1/64 | Fraction | 0.0156 | 0.40 |
| #78 | Number | 0.0160 | 0.41 |
| #77 | Number | 0.0180 | 0.46 |
| #76 | Number | 0.0200 | 0.51 |
| #75 | Number | 0.0210 | 0.53 |
| #74 | Number | 0.0225 | 0.57 |
| #73 | Number | 0.0240 | 0.61 |
| #72 | Number | 0.0250 | 0.64 |
| #71 | Number | 0.0260 | 0.66 |
| #70 | Number | 0.0280 | 0.71 |
| #69 | Number | 0.0292 | 0.74 |
| #68 | Number | 0.0310 | 0.79 |
| 1/32 | Fraction | 0.0313 | 0.79 |
| #67 | Number | 0.0320 | 0.81 |
| #66 | Number | 0.0330 | 0.84 |
| #65 | Number | 0.0350 | 0.89 |
| #64 | Number | 0.0360 | 0.91 |
| #63 | Number | 0.0370 | 0.94 |
| #62 | Number | 0.0380 | 0.97 |
| #61 | Number | 0.0390 | 0.99 |
| #60 | Number | 0.0400 | 1.02 |
| #59 | Number | 0.0410 | 1.04 |
| #58 | Number | 0.0420 | 1.07 |
| #57 | Number | 0.0430 | 1.09 |
| #56 | Number | 0.0465 | 1.18 |
| 3/64 | Fraction | 0.0469 | 1.19 |
| #55 | Number | 0.0520 | 1.32 |
| #54 | Number | 0.0550 | 1.40 |
| #53 | Number | 0.0595 | 1.51 |
| 1/16 | Fraction | 0.0625 | 1.59 |
| #52 | Number | 0.0635 | 1.61 |
| #51 | Number | 0.0670 | 1.70 |
| #50 | Number | 0.0700 | 1.78 |
| #49 | Number | 0.0730 | 1.85 |
| #48 | Number | 0.0760 | 1.93 |
| 5/64 | Fraction | 0.0781 | 1.98 |
| #47 | Number | 0.0785 | 1.99 |
| #46 | Number | 0.0810 | 2.06 |
| #45 | Number | 0.0820 | 2.08 |
| #44 | Number | 0.0860 | 2.18 |
| #43 | Number | 0.0890 | 2.26 |
| #42 | Number | 0.0935 | 2.37 |
| 3/32 | Fraction | 0.0938 | 2.38 |
| #41 | Number | 0.0960 | 2.44 |
| #40 | Number | 0.0980 | 2.49 |
| #39 | Number | 0.0995 | 2.53 |
| #38 | Number | 0.1015 | 2.58 |
| #37 | Number | 0.1040 | 2.64 |
| #36 | Number | 0.1065 | 2.71 |
| 7/64 | Fraction | 0.1094 | 2.78 |
| #35 | Number | 0.1100 | 2.79 |
| #34 | Number | 0.1110 | 2.82 |
| #33 | Number | 0.1130 | 2.87 |
| #32 | Number | 0.1160 | 2.95 |
| #31 | Number | 0.1200 | 3.05 |
| 1/8 | Fraction | 0.1250 | 3.17 |
| #30 | Number | 0.1285 | 3.26 |
| #29 | Number | 0.1360 | 3.45 |
| #28 | Number | 0.1405 | 3.57 |
| 9/64 | Fraction | 0.1406 | 3.57 |
| #27 | Number | 0.1440 | 3.66 |
| #26 | Number | 0.1470 | 3.73 |
| #25 | Number | 0.1495 | 3.80 |
| #24 | Number | 0.1520 | 3.86 |
| #23 | Number | 0.1540 | 3.91 |
| 5/32 | Fraction | 0.1563 | 3.97 |
| #22 | Number | 0.1570 | 3.99 |
| #21 | Number | 0.1590 | 4.04 |
| #20 | Number | 0.1610 | 4.09 |
| #19 | Number | 0.1660 | 4.22 |
| #18 | Number | 0.1695 | 4.31 |
| 11/64 | Fraction | 0.1719 | 4.37 |
| #17 | Number | 0.1730 | 4.39 |
| #16 | Number | 0.1770 | 4.50 |
| #15 | Number | 0.1800 | 4.57 |
| #14 | Number | 0.1820 | 4.62 |
| #13 | Number | 0.1850 | 4.70 |
| 3/16 | Fraction | 0.1875 | 4.76 |
| #12 | Number | 0.1890 | 4.80 |
| #11 | Number | 0.1910 | 4.85 |
| #10 | Number | 0.1935 | 4.91 |
| #9 | Number | 0.1960 | 4.98 |
| #8 | Number | 0.1990 | 5.05 |
| #7 | Number | 0.2010 | 5.11 |
| 13/64 | Fraction | 0.2031 | 5.16 |
| #6 | Number | 0.2040 | 5.18 |
| #5 | Number | 0.2055 | 5.22 |
| #4 | Number | 0.2090 | 5.31 |
| #3 | Number | 0.2130 | 5.41 |
| 7/32 | Fraction | 0.2188 | 5.56 |
| #2 | Number | 0.2210 | 5.61 |
| #1 | Number | 0.2280 | 5.79 |
| A | Letter | 0.2340 | 5.94 |
| 15/64 | Fraction | 0.2344 | 5.95 |
| B | Letter | 0.2380 | 6.05 |
| C | Letter | 0.2420 | 6.15 |
| D | Letter | 0.2460 | 6.25 |
| 1/4 | Fraction | 0.2500 | 6.35 |
| E | Letter | 0.2500 | 6.35 |
| F | Letter | 0.2570 | 6.53 |
| G | Letter | 0.2610 | 6.63 |
| 17/64 | Fraction | 0.2656 | 6.75 |
| H | Letter | 0.2660 | 6.76 |
| I | Letter | 0.2720 | 6.91 |
| J | Letter | 0.2770 | 7.04 |
| K | Letter | 0.2810 | 7.14 |
| 9/32 | Fraction | 0.2813 | 7.14 |
| L | Letter | 0.2900 | 7.37 |
| M | Letter | 0.2950 | 7.49 |
| 19/64 | Fraction | 0.2969 | 7.54 |
| N | Letter | 0.3020 | 7.67 |
| 5/16 | Fraction | 0.3125 | 7.94 |
| O | Letter | 0.3160 | 8.03 |
| P | Letter | 0.3230 | 8.20 |
| 21/64 | Fraction | 0.3281 | 8.33 |
| Q | Letter | 0.3320 | 8.43 |
| R | Letter | 0.3390 | 8.61 |
| 11/32 | Fraction | 0.3438 | 8.73 |
| S | Letter | 0.3480 | 8.84 |
| T | Letter | 0.3580 | 9.09 |
| 23/64 | Fraction | 0.3594 | 9.13 |
| U | Letter | 0.3680 | 9.35 |
| 3/8 | Fraction | 0.3750 | 9.52 |
| V | Letter | 0.3770 | 9.58 |
| W | Letter | 0.3860 | 9.80 |
| 25/64 | Fraction | 0.3906 | 9.92 |
| X | Letter | 0.3970 | 10.08 |
| Y | Letter | 0.4040 | 10.26 |
| 13/32 | Fraction | 0.4063 | 10.32 |
| Z | Letter | 0.4130 | 10.49 |
| 27/64 | Fraction | 0.4219 | 10.72 |
| 7/16 | Fraction | 0.4375 | 11.11 |
| 29/64 | Fraction | 0.4531 | 11.51 |
| 15/32 | Fraction | 0.4688 | 11.91 |
| 31/64 | Fraction | 0.4844 | 12.30 |
| 1/2 | Fraction | 0.5000 | 12.70 |
Every 64th of an inch as a decimal and in millimeters.
Show the chart| Fraction | Inches | Millimeters |
|---|---|---|
| 1/64 | 0.015625 | 0.40 |
| 1/32 | 0.03125 | 0.79 |
| 3/64 | 0.046875 | 1.19 |
| 1/16 | 0.0625 | 1.59 |
| 5/64 | 0.078125 | 1.98 |
| 3/32 | 0.09375 | 2.38 |
| 7/64 | 0.109375 | 2.78 |
| 1/8 | 0.1250 | 3.17 |
| 9/64 | 0.140625 | 3.57 |
| 5/32 | 0.15625 | 3.97 |
| 11/64 | 0.171875 | 4.37 |
| 3/16 | 0.1875 | 4.76 |
| 13/64 | 0.203125 | 5.16 |
| 7/32 | 0.21875 | 5.56 |
| 15/64 | 0.234375 | 5.95 |
| 1/4 | 0.2500 | 6.35 |
| 17/64 | 0.265625 | 6.75 |
| 9/32 | 0.28125 | 7.14 |
| 19/64 | 0.296875 | 7.54 |
| 5/16 | 0.3125 | 7.94 |
| 21/64 | 0.328125 | 8.33 |
| 11/32 | 0.34375 | 8.73 |
| 23/64 | 0.359375 | 9.13 |
| 3/8 | 0.3750 | 9.52 |
| 25/64 | 0.390625 | 9.92 |
| 13/32 | 0.40625 | 10.32 |
| 27/64 | 0.421875 | 10.72 |
| 7/16 | 0.4375 | 11.11 |
| 29/64 | 0.453125 | 11.51 |
| 15/32 | 0.46875 | 11.91 |
| 31/64 | 0.484375 | 12.30 |
| 1/2 | 0.5000 | 12.70 |
| 33/64 | 0.515625 | 13.10 |
| 17/32 | 0.53125 | 13.49 |
| 35/64 | 0.546875 | 13.89 |
| 9/16 | 0.5625 | 14.29 |
| 37/64 | 0.578125 | 14.68 |
| 19/32 | 0.59375 | 15.08 |
| 39/64 | 0.609375 | 15.48 |
| 5/8 | 0.6250 | 15.88 |
| 41/64 | 0.640625 | 16.27 |
| 21/32 | 0.65625 | 16.67 |
| 43/64 | 0.671875 | 17.07 |
| 11/16 | 0.6875 | 17.46 |
| 45/64 | 0.703125 | 17.86 |
| 23/32 | 0.71875 | 18.26 |
| 47/64 | 0.734375 | 18.65 |
| 3/4 | 0.7500 | 19.05 |
| 49/64 | 0.765625 | 19.45 |
| 25/32 | 0.78125 | 19.84 |
| 51/64 | 0.796875 | 20.24 |
| 13/16 | 0.8125 | 20.64 |
| 53/64 | 0.828125 | 21.03 |
| 27/32 | 0.84375 | 21.43 |
| 55/64 | 0.859375 | 21.83 |
| 7/8 | 0.8750 | 22.22 |
| 57/64 | 0.890625 | 22.62 |
| 29/32 | 0.90625 | 23.02 |
| 59/64 | 0.921875 | 23.42 |
| 15/16 | 0.9375 | 23.81 |
| 61/64 | 0.953125 | 24.21 |
| 31/32 | 0.96875 | 24.61 |
| 63/64 | 0.984375 | 25.00 |
| 1 | 1.0000 | 25.40 |
Thickness of the common sheet gauges. Steel and aluminum gauges are different systems: the same number is not the same thickness.
Show the chart| Gauge | Steel sheet, in | Aluminum sheet, in |
|---|---|---|
| 10 | 0.1345 | 0.1019 |
| 11 | 0.1196 | 0.0907 |
| 12 | 0.1046 | 0.0808 |
| 14 | 0.0747 | 0.0641 |
| 16 | 0.0598 | 0.0508 |
| 18 | 0.0478 | 0.0403 |
| 20 | 0.0359 | 0.0320 |
| 22 | 0.0299 | 0.0253 |
| 24 | 0.0239 | 0.0201 |
| 26 | 0.0179 | 0.0159 |
The standard square key for a shaft diameter. The keyseat in the shaft and in the hub are each half the key's height deep.
Show the chart| Shaft diameter, over | Up to and including | Key width and height |
|---|---|---|
| 7/16 | 9/16 | 1/8 |
| 9/16 | 7/8 | 3/16 |
| 7/8 | 1-1/4 | 1/4 |
| 1-1/4 | 1-3/8 | 5/16 |
| 1-3/8 | 1-3/4 | 3/8 |
| 1-3/4 | 2-1/4 | 1/2 |
| 2-1/4 | 2-3/4 | 5/8 |
| 2-3/4 | 3-1/4 | 3/4 |
Every common G-code on a machining center control, and whether it stays on until changed. Standard meanings. A machine builder can add codes and change some of these, so the machine's own manual has the last word.
Show the chart| Code | What it does | How long |
|---|---|---|
| G00 | Rapid positioning | Stays on |
| G01 | Straight cut at the feed rate | Stays on |
| G02 | Arc or helix, clockwise | Stays on |
| G03 | Arc or helix, counterclockwise | Stays on |
| G04 | Dwell: X or P gives the time | One block |
| G09 | Exact stop at the end of this block | One block |
| G10 | Programmable data input: offsets and work coordinates | One block |
| G11 | Programmable data input, cancel | One block |
| G15 | Polar coordinates, cancel | Stays on |
| G16 | Polar coordinates: radius and angle | Stays on |
| G17 | XY plane | Stays on |
| G18 | ZX plane | Stays on |
| G19 | YZ plane | Stays on |
| G20 | Inch input | Stays on |
| G21 | Metric input | Stays on |
| G22 | Stored stroke check, on | Stays on |
| G23 | Stored stroke check, off | Stays on |
| G27 | Reference position return check | One block |
| G28 | Return to the reference position, through a point | One block |
| G29 | Return from the reference position | One block |
| G30 | Return to the second, third or fourth reference position | One block |
| G31 | Skip function: move until the probe signal | One block |
| G33 | Thread cutting | Stays on |
| G40 | Cutter radius compensation, cancel | Stays on |
| G41 | Cutter radius compensation, left of the path | Stays on |
| G42 | Cutter radius compensation, right of the path | Stays on |
| G43 | Tool length compensation, plus: H names the offset | Stays on |
| G44 | Tool length compensation, minus | Stays on |
| G49 | Tool length compensation, cancel | Stays on |
| G50 | Scaling, cancel | Stays on |
| G51 | Scaling | Stays on |
| G50.1 | Programmable mirror image, cancel | Stays on |
| G51.1 | Programmable mirror image | Stays on |
| G52 | Local coordinate system: a shift inside the work offset | One block |
| G53 | Move in machine coordinates | One block |
| G54 | Work coordinate system 1 | Stays on |
| G55 | Work coordinate system 2 | Stays on |
| G56 | Work coordinate system 3 | Stays on |
| G57 | Work coordinate system 4 | Stays on |
| G58 | Work coordinate system 5 | Stays on |
| G59 | Work coordinate system 6 | Stays on |
| G54.1 | Additional work coordinate systems: P1 to P48 | Stays on |
| G60 | Single direction positioning | One block |
| G61 | Exact stop mode | Stays on |
| G62 | Automatic corner override | Stays on |
| G63 | Tapping mode | Stays on |
| G64 | Cutting mode | Stays on |
| G65 | Macro call: P names the program, letters pass values | One block |
| G66 | Macro modal call | Stays on |
| G67 | Macro modal call, cancel | Stays on |
| G68 | Coordinate rotation: R gives the angle | Stays on |
| G69 | Coordinate rotation, cancel | Stays on |
| G73 | High speed peck drilling cycle | Stays on |
| G74 | Left-hand tapping cycle | Stays on |
| G76 | Fine boring cycle: orient and shift before pulling out | Stays on |
| G80 | Canned cycle, cancel | Stays on |
| G81 | Drilling cycle | Stays on |
| G82 | Drilling cycle with a dwell: spot face, counterbore | Stays on |
| G83 | Peck drilling cycle: Q is the peck | Stays on |
| G84 | Tapping cycle | Stays on |
| G85 | Boring cycle: feed in, feed out | Stays on |
| G86 | Boring cycle: feed in, spindle stop, rapid out | Stays on |
| G87 | Back boring cycle | Stays on |
| G88 | Boring cycle: feed in, dwell, manual out | Stays on |
| G89 | Boring cycle: feed in, dwell, feed out | Stays on |
| G90 | Absolute programming | Stays on |
| G91 | Incremental programming | Stays on |
| G92 | Set the work coordinate system, or clamp the spindle speed | One block |
| G94 | Feed per minute | Stays on |
| G95 | Feed per revolution | Stays on |
| G96 | Constant surface speed | Stays on |
| G97 | Constant surface speed, cancel: S is rpm | Stays on |
| G98 | Canned cycle: return to the initial level | Stays on |
| G99 | Canned cycle: return to the R level | Stays on |
The G-codes on a lathe control, in the usual code system (system A). Standard meanings. A machine builder can add codes and change some of these, so the machine's own manual has the last word.
Show the chart| Code | What it does | How long |
|---|---|---|
| G00 | Rapid positioning | Stays on |
| G01 | Straight cut at the feed rate | Stays on |
| G02 | Arc, clockwise | Stays on |
| G03 | Arc, counterclockwise | Stays on |
| G04 | Dwell | One block |
| G10 | Programmable data input | One block |
| G20 | Inch input | Stays on |
| G21 | Metric input | Stays on |
| G27 | Reference position return check | One block |
| G28 | Return to the reference position | One block |
| G30 | Return to the second reference position | One block |
| G32 | Thread cutting, one pass | Stays on |
| G34 | Variable lead thread cutting | Stays on |
| G40 | Tool nose radius compensation, cancel | Stays on |
| G41 | Tool nose radius compensation, left | Stays on |
| G42 | Tool nose radius compensation, right | Stays on |
| G50 | Set the coordinate system, or clamp the top spindle speed | One block |
| G52 | Local coordinate system | One block |
| G53 | Move in machine coordinates | One block |
| G54 to G59 | Work coordinate systems 1 to 6 | Stays on |
| G65 | Macro call | One block |
| G66 | Macro modal call | Stays on |
| G67 | Macro modal call, cancel | Stays on |
| G70 | Finishing cycle: follows the profile roughed by G71, G72 or G73 | One block |
| G71 | Stock removal in turning: roughs along Z | One block |
| G72 | Stock removal in facing: roughs along X | One block |
| G73 | Pattern repeating: roughs parallel to the profile | One block |
| G74 | End face peck drilling, or face grooving | One block |
| G75 | Outside or inside diameter grooving, with pecks | One block |
| G76 | Multiple pass threading cycle | One block |
| G80 | Drilling canned cycle, cancel | Stays on |
| G83 | Face drilling cycle | Stays on |
| G84 | Face tapping cycle | Stays on |
| G85 | Face boring cycle | Stays on |
| G87 | Side drilling cycle | Stays on |
| G88 | Side tapping cycle | Stays on |
| G89 | Side boring cycle | Stays on |
| G90 | Outside or inside diameter cutting cycle, one pass | Stays on |
| G92 | Threading cycle, one pass each block | Stays on |
| G94 | End face turning cycle, one pass | Stays on |
| G96 | Constant surface speed: S is surface speed | Stays on |
| G97 | Constant surface speed, cancel: S is rpm | Stays on |
| G98 | Feed per minute | Stays on |
| G99 | Feed per revolution | Stays on |
The M-codes that mean the same thing on nearly every machine. The rest are set by the machine builder: pallet changers, chip conveyors, air blast, probes and clamps all differ.
Show the chart| Code | What it does |
|---|---|
| M00 | Program stop: the cycle waits for cycle start |
| M01 | Optional stop: stops only when the optional stop switch is on |
| M02 | End of program |
| M30 | End of program and rewind to the top |
| M03 | Spindle on, clockwise |
| M04 | Spindle on, counterclockwise |
| M05 | Spindle stop |
| M19 | Spindle orientation |
| M06 | Tool change |
| M08 | Coolant on |
| M09 | Coolant off |
| M29 | Rigid tapping mode |
| M98 | Call a subprogram: P names it, L or the leading digits of P give the repeats |
| M99 | End of a subprogram: return to the calling program. In a main program, loop back to the top |
The letters in a line of G-code and what the number after each one stands for.
Show the chart| Letter | What it means |
|---|---|
| O | Program number |
| N | Sequence (line) number |
| G | Preparatory function: the kind of motion or mode |
| M | Miscellaneous function: spindle, coolant, tool change, program flow |
| X, Y, Z | The three straight directions of travel |
| A, B, C | Rotation about X, Y and Z |
| U, V, W | Incremental X, Y and Z on a lathe, or extra straight directions of travel |
| I, J, K | Arc center, measured from the start point, along X, Y and Z. Also shifts in some cycles |
| R | Arc radius. In a canned cycle, the R level the tool rapids to |
| F | Feed rate |
| S | Spindle speed, or surface speed under G96 |
| T | Tool number |
| H | Tool length offset number |
| D | Cutter radius offset number |
| P | Dwell time, program number, or work offset number, by the code it follows |
| Q | Peck depth in a drilling cycle, or a shift in a boring cycle |
| L | Number of repeats |
| / | Block skip: the line is passed over when the block skip switch is on |
| ( ) | A comment: the control passes over it |
| % | Start and end of the tape or file |
The variables, math, comparisons and flow commands of custom macro programming, and which letter fills which variable in a G65 call. Standard meanings. A machine builder can add codes and change some of these, so the machine's own manual has the last word.
Show the chart| Item | Kind | What it does |
|---|---|---|
| #0 | Variable | Always empty (null). Reading it gives no value |
| #1 to #33 | Variables | Local: passed in by a macro call, cleared when the macro ends |
| #100 to #199 | Variables | Common: shared by every program, cleared at power off |
| #500 to #999 | Variables | Common: shared by every program, kept at power off |
| #1000 and up | Variables | System: offsets, positions, alarms, clock, modal codes |
| + - * / | Arithmetic | #101 = #102 + #103 * 2 |
| SIN COS TAN ATAN | Functions | Angles in degrees: #1 = SIN[30] |
| SQRT ABS | Functions | Square root and absolute value: #1 = SQRT[#2] |
| ROUND FIX FUP | Functions | Round off, round toward zero, round away from zero |
| AND OR XOR | Logic | Bit by bit, or between conditions |
| EQ NE | Compare | Equal, not equal |
| GT GE | Compare | Greater than, greater than or equal |
| LT LE | Compare | Less than, less than or equal |
| GOTO n | Flow | Jump to sequence number n |
| IF [ ] GOTO n | Flow | Jump when the condition is true: IF [#1 GT 10] GOTO 99 |
| IF [ ] THEN | Flow | Do one statement when true: IF [#1 EQ 0] THEN #2 = 5 |
| WHILE [ ] DO m ... END m | Flow | Repeat while true; m is 1, 2 or 3 |
| G65 P_ A_ B_ ... | Call | Run program P as a macro. A is #1, B is #2, C is #3 |
| I J K | Call | #4, #5, #6 |
| D E F H | Call | #7, #8, #9, #11 |
| M Q R S T | Call | #13, #17, #18, #19, #20 |
| U V W X Y Z | Call | #21, #22, #23, #24, #25, #26 |
| #3000 = n (TEXT) | Alarm | Stop with a macro alarm and a message |
| #3006 = n (TEXT) | Message | Stop with a message; cycle start carries on |
The reserved words of the language: each one, what it is for, and a short example.
Show the chart| Keyword | What it does | Example |
|---|---|---|
| if elif else | Choose between branches | if x > 0: ... elif x == 0: ... else: ... |
| for in | Loop over each item | for part in parts: ... |
| while | Loop while a condition holds | while n > 0: n -= 1 |
| break continue | Leave a loop, or skip to its next turn | if done: break |
| def return | Define a function, and hand back its answer | def area(r): return 3.14159 * r * r |
| lambda | A small function with no name | key=lambda p: p.qty |
| class | Define a kind of object | class Part: ... |
| pass | Do nothing; a placeholder | def later(): pass |
| import from as | Bring in a module, or names from it | from math import sqrt as root |
| try except finally | Catch an error, and clean up either way | try: f() except ValueError: ... finally: ... |
| raise | Signal an error | raise ValueError("too long") |
| assert | Stop if a condition is false | assert qty > 0 |
| with as | Open something and close it for you | with open("a.txt") as f: ... |
| and or not | Combine or flip conditions | if a and not b: ... |
| in not in | Test membership | if "x" in name: ... |
| is is not | Test for the same object | if x is None: ... |
| True False None | The two truth values, and no value | found = None |
| global nonlocal | Use a name from an outer scope | global count |
| del | Remove a name or an item | del items[0] |
| yield | Hand back one value from a generator | yield line |
| async await | Define and wait on a coroutine | await fetch(url) |
The functions that are always there with nothing to import.
Show the chart| Function | What it does | Example |
|---|---|---|
| print() | Write to the screen | print("Dia:", d) |
| input() | Read a line typed by the user | name = input("Name? ") |
| len() | How many items | len(parts) |
| range() | A run of whole numbers | range(0, 10, 2) |
| int() float() str() bool() | Convert to a whole number, decimal, text or truth value | float("0.250") |
| list() tuple() dict() set() | Make a list, tuple, dictionary or set | list(range(3)) |
| type() isinstance() | What kind of thing it is | isinstance(x, float) |
| abs() round() | Absolute value, and rounding | round(1.23456, 3) |
| min() max() sum() | Smallest, largest and total | max(depths) |
| pow() divmod() | Power, and quotient with remainder | divmod(17, 5) |
| sorted() reversed() | A sorted copy, and a backward pass | sorted(tools, key=len) |
| enumerate() | Items with their count | for i, t in enumerate(tools): ... |
| zip() | Pair up items from several lists | for x, y in zip(xs, ys): ... |
| map() filter() | Apply a function to each item, or keep those that pass | list(map(float, words)) |
| any() all() | True if any, or every, item is true | all(d > 0 for d in dims) |
| open() | Open a file | open("part.nc", "w") |
| format() | Format a value as text | format(0.5, ".4f") |
| chr() ord() | A character from its number, and back | ord("A") |
| hex() bin() | Text in base 16 or base 2 | hex(255) |
| id() hash() dir() help() | Look inside an object | help(str.split) |
| getattr() setattr() hasattr() | Read, set or test an attribute by name | getattr(part, "qty", 1) |
What you can do with a piece of text. Here s is any text.
Show the chart| Command | What it does | Example |
|---|---|---|
| s.upper() s.lower() s.title() | Change the case | "g01".upper() |
| s.strip() s.lstrip() s.rstrip() | Trim spaces from the ends | line.strip() |
| s.split() s.splitlines() | Break into a list | "X1 Y2".split() |
| sep.join() | Glue a list into one text | " ".join(words) |
| s.replace() | Swap one piece of text for another | s.replace("G0 ", "G00 ") |
| s.find() s.index() s.count() | Where a piece is, and how often | s.find("Z") |
| s.startswith() s.endswith() | Test the ends | name.endswith(".nc") |
| s.isdigit() s.isalpha() s.isspace() | Test what it is made of | "42".isdigit() |
| s.zfill() s.ljust() s.rjust() s.center() | Pad to a width | "7".zfill(4) |
| s.format() | Fill in the blanks | "X{:.4f}".format(x) |
| f"..." | Text with values written in place | f"X{x:.4f} Y{y:.4f}" |
| s[a:b] | A slice of the text | line[1:5] |
| s.encode() | Text to bytes | s.encode("utf-8") |
The commands for the three everyday containers. Here a is a list, d a dictionary and s a set.
Show the chart| Command | What it does | Example |
|---|---|---|
| a.append(x) a.extend(b) a.insert(i, x) | Add to a list | holes.append((x, y)) |
| a.pop() a.remove(x) a.clear() | Take out of a list | last = holes.pop() |
| a.sort() a.reverse() | Order a list in place | depths.sort(reverse=True) |
| a.index(x) a.count(x) a.copy() | Find, count and copy | tools.index("T5") |
| a[i] a[-1] a[a:b] a[::2] | One item, the last item, a slice, every other item | first, last = a[0], a[-1] |
| [f(x) for x in a if test] | Build a list from another in one line | [d / 25.4 for d in mm] |
| d[key] d.get(key, default) | Look up a value in a dictionary | feeds.get("aluminum", 20) |
| d.keys() d.values() d.items() | Its keys, values, or both | for k, v in d.items(): ... |
| d.update(e) d.pop(key) d.setdefault(key, v) | Change a dictionary | d.update(extra) |
| {k: v for k, v in pairs} | Build a dictionary in one line | {t: len(t) for t in tools} |
| s.add(x) s.discard(x) | Change a set | seen.add(name) |
| s | t s & t s - t | Union, overlap and difference of sets | new = now - before |
| a, b = b, a | Swap, or unpack several values at once | x, y = point |
The symbols, and the standard modules most scripts reach for first.
Show the chart| Item | What it does | Example |
|---|---|---|
| + - * / | Add, subtract, multiply, divide | 7 / 2 is 3.5 |
| // % | Whole-number division, and the remainder | 7 // 2 is 3; 7 % 2 is 1 |
| ** | Power | 2 ** 10 is 1024 |
| == != | Equal, not equal | if a == b: ... |
| < <= > >= | Compare | 0 < x <= 10 |
| = += -= *= /= | Assign, or change in place | total += 1 |
| := | Assign inside an expression | if (n := len(a)) > 5: ... |
| & | ^ ~ << >> | Work on the bits | flags & 0x04 |
| x if test else y | One value or the other | s = "in" if inch else "mm" |
| # | A comment to the end of the line | # rough pass |
| """...""" | Text over several lines; a docstring | """Return the tap drill.""" |
| math | Module: sqrt, sin, cos, tan, atan2, pi, radians, degrees, floor, ceil | import math; math.atan2(y, x) |
| pathlib os sys | Modules: files, folders and the command line | Path("out").mkdir(exist_ok=True) |
| json csv re | Modules: read and write JSON and CSV, and match patterns | json.load(f) |
| datetime time random | Modules: dates, clocks and random numbers | datetime.date.today() |
The words of the language you meet first, with a short example of each.
Show the chart| Item | What it does | Example |
|---|---|---|
| int long short char bool | Whole number, character and truth types | int count = 0; |
| float double | Decimal number types | double dia = 0.250; |
| auto | Let the compiler work out the type | auto it = parts.begin(); |
| const constexpr | A value that cannot change; one fixed at compile time | constexpr double PI = 3.14159265; |
| unsigned size_t | Types that are never negative | std::size_t n = v.size(); |
| if else switch case default | Choose between branches | if (x > 0) { ... } else { ... } |
| for while do | Loops | for (int i = 0; i < n; ++i) { ... } |
| for ( : ) | Loop over every item in a container | for (const auto& p : parts) { ... } |
| break continue return | Leave a loop, skip a turn, hand back a value | return total; |
| class struct | Define a type with data and functions | struct Hole { double x, y, dia; }; |
| public private protected | Who may reach a member | private: int qty_; |
| virtual override | A function a derived class may replace | void cut() override; |
| namespace using | Group names, and bring them into reach | using std::string; |
| template typename | Write code once for many types | template <typename T> T half(T x) { return x / 2; } |
| new delete | Make and free memory by hand; smart pointers are safer | auto p = std::make_unique<Part>(); |
| try catch throw | Raise and handle errors | try { run(); } catch (const std::exception& e) { ... } |
| enum class | A named set of choices | enum class Unit { Inch, Metric }; |
| static inline extern | Storage and linkage of a name | static int made = 0; |
| nullptr | A pointer to nothing | if (p == nullptr) return; |
| #include #define #ifndef #pragma once | Bring in a header, define a macro, guard a header | #include <vector> |
| // /* */ | Comments | // rough pass |
| int main() | Where the program starts | int main() { return 0; } |
The symbols and what each one does.
Show the chart| Item | What it does | Example |
|---|---|---|
| + - * / % | Arithmetic and remainder | 7 / 2 is 3; 7 % 2 is 1; 7 / 2.0 is 3.5 |
| ++ -- | Add or take away one | ++i; |
| = += -= *= /= | Assign, or change in place | total += qty; |
| == != < <= > >= | Compare | if (a != b) ... |
| && || ! | And, or, not | if (on && !done) ... |
| & | ^ ~ << >> | Work on the bits | flags |= 0x04; |
| ? : | One value or the other | auto u = inch ? "in" : "mm"; |
| * & -> | Follow a pointer, take an address, reach a member through a pointer | p->qty |
| :: | A name inside a namespace or class | std::cout |
| . | A member of an object | hole.dia |
| [] | An item of an array or container | v[0] |
| static_cast<T>() | Convert between types on purpose | static_cast<double>(n) |
| sizeof() | The size of a type or object in bytes | sizeof(int) |
| << >> with streams | Write to, or read from, a stream | std::cout << x << "\n"; |
| [ ]( ){ } | A lambda: a small function written in place | [&](int x) { return x * k; } |
The containers, streams and functions most programs reach for.
Show the chart| Item | What it does | Example |
|---|---|---|
| std::string | Text | std::string name = "plate"; |
| std::vector<T> | A list that grows | std::vector<double> d{0.25, 0.5}; |
| std::array<T, N> | A list of fixed length | std::array<int, 3> xyz{}; |
| std::map std::unordered_map | Look up a value by a key | feeds["aluminum"] = 20; |
| std::set | Unique items, kept in order | seen.insert(id); |
| std::pair std::tuple | Two or more values together | auto [x, y] = point; |
| std::optional<T> | A value that may be missing | if (auto d = find(id)) use(*d); |
| push_back emplace_back pop_back | Add to, or take from, the end of a vector | v.push_back(0.375); |
| size empty clear begin end | What every container offers | if (!v.empty()) ... |
| std::cout std::cin std::cerr | Screen out, keyboard in, error out | std::cout << "Dia: " << d << "\n"; |
| std::ifstream std::ofstream | Read and write files | std::ofstream out("part.nc"); |
| std::getline | Read one line of text | while (std::getline(in, line)) ... |
| std::sort std::find std::count | Order and search a range | std::sort(v.begin(), v.end()); |
| std::min std::max std::accumulate | Smallest, largest and total | std::accumulate(v.begin(), v.end(), 0.0) |
| std::sqrt std::sin std::cos std::atan2 std::abs | Math, from <cmath> | std::atan2(y, x) |
| std::to_string std::stod std::stoi | Number to text and back | std::stod("0.250") |
| std::unique_ptr std::shared_ptr | Pointers that free themselves | auto p = std::make_shared<Tool>(); |
| std::thread std::mutex | Run work side by side, and guard shared data | std::thread t(run); t.join(); |
| std::chrono | Clocks and time spans | auto t0 = std::chrono::steady_clock::now(); |
The print formats and the everyday functions of the C standard library.
Show the chart| Item | What it does | Example |
|---|---|---|
| printf() | Print with a format | printf("X%.4f Y%.4f\n", x, y); |
| %d %ld %u | Format: whole numbers | printf("%d", qty); |
| %f %.3f %e %g | Format: decimals, with places, or powers of ten | printf("%.3f", dia); |
| %s %c %x %p %% | Format: text, one character, base 16, a pointer, a percent sign | printf("%s", name); |
| scanf() fgets() | Read typed input, or one line | fgets(line, sizeof line, stdin); |
| fopen() fclose() fprintf() fscanf() | Open, close, write and read a file | FILE *f = fopen("a.txt", "w"); |
| malloc() calloc() realloc() free() | Get and give back memory | double *d = malloc(n * sizeof *d); |
| strlen() strcpy() strcat() strcmp() | Length, copy, join and compare text | if (strcmp(a, b) == 0) ... |
| strtol() strtod() atoi() atof() | Text to a number | double v = strtod(s, NULL); |
| sqrt() pow() sin() cos() atan2() fabs() | Math, from math.h | double h = sqrt(a * a + b * b); |
| struct typedef enum union | Build your own types | typedef struct { double x, y; } Point; |
| * & -> [] | Pointers, addresses and arrays | int *p = &count; |
| #include #define #ifdef | Headers, macros and conditional code | #define MAX 64 |
| stdio.h stdlib.h string.h math.h | The headers used most | #include <stdio.h> |
| int main(int argc, char *argv[]) | Where the program starts, with its command line | return 0; |
| sizeof | The size of a type or object in bytes | sizeof(double) |
The statements and operators of the language of web pages.
Show the chart| Item | What it does | Example |
|---|---|---|
| let const var | Declare a name; const cannot be reassigned | const dia = 0.25; |
| function => | Define a function | const half = (x) => x / 2; |
| if else switch | Choose between branches | if (x > 0) { ... } else { ... } |
| for for...of for...in while | Loops: counted, over items, over keys, while true | for (const p of parts) { ... } |
| return break continue | Hand back a value, leave a loop, skip a turn | return total; |
| === !== | Equal and not equal, with no type conversion | if (a === b) ... |
| && || ! ?? | And, or, not, and "use this if the left is missing" | const n = qty ?? 1; |
| ?. | Reach a member only if the object is there | part?.name |
| ... | Spread a list or object out, or gather the rest | const all = [...a, ...b]; |
| `text ${x}` | Text with values written in place | `X${x.toFixed(4)}` |
| { a, b } = obj [x, y] = list | Unpack values by name or by place | const [x, y] = point; |
| class extends new this | Define and make objects | class Hole extends Feature { ... } |
| try catch finally throw | Raise and handle errors | try { run(); } catch (e) { ... } |
| async await Promise | Wait on work that finishes later | const r = await fetch(url); |
| import export | Share code between files | import { area } from "./math.js"; |
| typeof instanceof | What kind of thing it is | typeof x === "number" |
| null undefined NaN | No value, not yet set, and not a number | Number.isNaN(x) |
The commands for lists, text, numbers and the page. Here a is an array, s is text and n a number.
Show the chart| Item | What it does | Example |
|---|---|---|
| a.push() a.pop() a.shift() a.unshift() | Add or take from the ends of an array | holes.push([x, y]); |
| a.map() a.filter() a.reduce() | Change each item, keep some, or fold to one value | mm.map((d) => d / 25.4) |
| a.find() a.includes() a.indexOf() a.some() a.every() | Search an array | tools.includes("T5") |
| a.sort() a.reverse() a.slice() a.splice() a.join() | Order, cut and glue an array | a.sort((x, y) => x - y) |
| s.split() s.trim() s.replace() s.slice() | Break, trim, swap and cut text | line.trim().split(" ") |
| s.includes() s.startsWith() s.endsWith() | Test text | name.endsWith(".nc") |
| s.toUpperCase() s.toLowerCase() s.padStart() | Change case, and pad to a width | "7".padStart(4, "0") |
| Number() parseFloat() parseInt() n.toFixed() | Text to a number, and a number to fixed places | (0.5).toFixed(4) |
| Math.sqrt Math.abs Math.round Math.floor Math.ceil | Everyday math | Math.round(x * 1000) / 1000 |
| Math.sin Math.cos Math.atan2 Math.PI | Trig, in radians | Math.atan2(y, x) |
| Math.min Math.max Math.random | Smallest, largest, a random number | Math.max(...depths) |
| Object.keys() Object.values() Object.entries() | The names, values or both of an object | for (const [k, v] of Object.entries(o)) ... |
| JSON.parse() JSON.stringify() | Text to data and back | JSON.stringify(part, null, 2) |
| Map Set | Look up by key; a set of unique items | const seen = new Set(); |
| Date | Dates and times | new Date().toISOString() |
| console.log() | Print for the programmer | console.log("dia", d); |
| document.querySelector() addEventListener() | In a web page: find an element and listen to it | btn.addEventListener("click", run); |
| setTimeout() setInterval() | Run later, or again and again | setTimeout(done, 500); |
| fetch() | Ask a server for something | const r = await fetch("/api/jobs"); |
The everyday statements, types and collections.
Show the chart| Item | What it does | Example |
|---|---|---|
| int long double boolean char String | The everyday types | double dia = 0.250; |
| final | A value that cannot change | final int MAX = 64; |
| if else switch | Choose between branches | if (x > 0) { ... } |
| for while do | Loops | for (int i = 0; i < n; i++) { ... } |
| for ( : ) | Loop over every item | for (Hole h : holes) { ... } |
| class interface extends implements | Define types and how they relate | class Mill extends Machine { ... } |
| public private protected static | Who may reach a member, and whether it belongs to the class | private int qty; |
| new this super | Make an object, and name itself or its parent | Part p = new Part("plate"); |
| try catch finally throw throws | Raise and handle errors | try { run(); } catch (IOException e) { ... } |
| public static void main(String[] args) | Where the program starts | System.out.println("Ready"); |
| System.out.println() String.format() | Print, and format text | String.format("X%.4f", x) |
| ArrayList<T> HashMap<K, V> HashSet<T> | A growing list, a lookup table, a set of unique items | List<Double> d = new ArrayList<>(); |
| add get set remove size contains | What the collections offer | d.add(0.375); |
| Math.sqrt Math.abs Math.round Math.atan2 Math.PI | Everyday math | Math.sqrt(a * a + b * b) |
| equals() length() substring() split() trim() | Working with text | if (a.equals(b)) ... |
| Integer.parseInt() Double.parseDouble() | Text to a number | Double.parseDouble("0.250") |
| import package | Bring in, and name, a group of classes | import java.util.List; |
| var | Let the compiler work out the type | var holes = new ArrayList<Hole>(); |
The everyday statements, types and collections.
Show the chart| Item | What it does | Example |
|---|---|---|
| int long double decimal bool char string | The everyday types | double dia = 0.250; |
| var | Let the compiler work out the type | var holes = new List<Hole>(); |
| const readonly | Values that cannot change | const int Max = 64; |
| if else switch | Choose between branches | if (x > 0) { ... } |
| for foreach while do | Loops | foreach (var h in holes) { ... } |
| class struct record interface enum | Define your own types | record Hole(double X, double Y, double Dia); |
| public private protected internal static | Who may reach a member | private int qty; |
| get set | A property: a value with code behind it | public int Qty { get; set; } |
| new this base | Make an object, and name itself or its parent | var p = new Part("plate"); |
| try catch finally throw | Raise and handle errors | try { Run(); } catch (IOException e) { ... } |
| using | Bring in a namespace, or close something for you | using var f = File.OpenText(path); |
| async await Task | Wait on work that finishes later | var s = await client.GetStringAsync(url); |
| $"text {x}" | Text with values written in place | $"X{x:F4} Y{y:F4}" |
| List<T> Dictionary<K, V> HashSet<T> | A growing list, a lookup table, a set of unique items | var d = new List<double>(); |
| Where Select OrderBy First Any Sum | LINQ: filter, change, order and total a list | holes.Where(h => h.Dia > 0.25).Count() |
| Console.WriteLine() Console.ReadLine() | Print and read a line | Console.WriteLine("Ready"); |
| Math.Sqrt Math.Abs Math.Round Math.Atan2 Math.PI | Everyday math | Math.Round(x, 3) |
| int.Parse() double.TryParse() | Text to a number | double.TryParse(s, out var v) |
| ?. ?? | Reach a member only if it is there; a fallback value | name ?? "none" |
The commands for reading and changing tables. Take care with UPDATE and DELETE: with no WHERE they touch every row.
Show the chart| Item | What it does | Example |
|---|---|---|
| SELECT ... FROM | Read columns from a table | SELECT po, part, due FROM jobs; |
| WHERE | Keep only the rows that match | WHERE status = 'In progress' |
| AND OR NOT IN BETWEEN LIKE | Build a condition | WHERE due BETWEEN '2026-12-01' AND '2026-12-31' |
| IS NULL IS NOT NULL | Test for a missing value | WHERE delivered IS NULL |
| ORDER BY ASC DESC | Sort the result | ORDER BY due ASC |
| LIMIT OFFSET | Take only some rows | LIMIT 10 |
| DISTINCT | Each different value once | SELECT DISTINCT customer FROM jobs; |
| COUNT SUM AVG MIN MAX | Add up or summarize rows | SELECT COUNT(*) FROM jobs; |
| GROUP BY HAVING | Summarize by group, and filter the groups | GROUP BY customer HAVING COUNT(*) > 3 |
| JOIN ... ON | Match rows from two tables | FROM jobs j JOIN customers c ON c.name = j.customer |
| LEFT JOIN | Keep every row on the left, matched or not | LEFT JOIN files f ON f.job_id = j.id |
| AS | Give a column or table another name | SELECT amount * qty AS total |
| INSERT INTO ... VALUES | Add a row | INSERT INTO jobs (po, part) VALUES ('1001', 'Plate'); |
| UPDATE ... SET ... WHERE | Change rows. Without WHERE it changes them all | UPDATE jobs SET status = 'Complete' WHERE id = 7; |
| DELETE FROM ... WHERE | Remove rows. Without WHERE it removes them all | DELETE FROM jobs WHERE id = 7; |
| CREATE TABLE | Make a table | CREATE TABLE tools (id INTEGER PRIMARY KEY, name TEXT); |
| ALTER TABLE DROP TABLE | Change or remove a table | ALTER TABLE jobs ADD COLUMN machine TEXT; |
| PRIMARY KEY NOT NULL UNIQUE DEFAULT | Rules on a column | qty INTEGER NOT NULL DEFAULT 1 |
| CREATE INDEX | Speed up lookups on a column | CREATE INDEX jobs_due ON jobs (due); |
| BEGIN COMMIT ROLLBACK | Group changes so all happen or none do | BEGIN; ... COMMIT; |
| CASE WHEN ... THEN ... END | A value that depends on a condition | CASE WHEN due < date('now') THEN 'late' ELSE 'ok' END |
| -- | A comment to the end of the line | -- open jobs only |
The commands of the Linux and macOS command line.
Show the chart| Item | What it does | Example |
|---|---|---|
| pwd ls cd | Where am I, what is here, go there | ls -la |
| mkdir rmdir touch | Make and remove folders, make an empty file | mkdir -p out/parts |
| cp mv rm | Copy, move or rename, remove. There is no undo for rm | cp part.nc backup/ |
| cat less head tail | Show a file: all, a page at a time, the top, the end | tail -n 20 run.log |
| grep | Find lines that match | grep -n "G84" *.nc |
| find | Find files by name, age or size | find . -name "*.nc" -mtime -7 |
| sort uniq wc cut | Order lines, drop repeats, count, pick columns | sort tools.txt | uniq -c |
| sed awk | Change text, and work on columns | sed 's/G0 /G00 /g' in.nc > out.nc |
| | > >> < | Pipe into the next command; write, add to, or read from a file | ls | wc -l |
| && || ; | Run the next only if this worked, only if it failed, or either way | make && ./run |
| $VAR ${VAR} $(command) | The value of a variable, or the output of a command | echo "$HOME" |
| chmod chown | Change who may read, write and run a file | chmod +x run.sh |
| ps top kill | See what is running, and stop it | ps aux | grep node |
| df du | Disk space free, and space a folder uses | du -sh * |
| tar zip unzip | Pack and unpack files | tar -czf parts.tgz parts/ |
| ssh scp rsync | Run on another machine, and copy files to it | scp part.nc user@host:/nc/ |
| curl wget | Fetch from a web address | curl -s https://example.com/api |
| if [ ... ]; then ... fi | A branch in a script | if [ -f part.nc ]; then echo ok; fi |
| for x in ...; do ... done | A loop in a script | for f in *.nc; do wc -l "$f"; done |
| man --help | Read the manual for a command | man grep |
The commands of the Windows command line, with their short names where they have one.
Show the chart| Item | What it does | Example |
|---|---|---|
| Get-ChildItem (ls, dir) | List files and folders | Get-ChildItem -Recurse -Filter *.nc |
| Set-Location (cd) | Go to a folder | Set-Location D:\Jobs |
| Get-Content (cat) | Read a file | Get-Content run.log -Tail 20 |
| Set-Content Add-Content Out-File | Write, or add to, a file | "done" | Add-Content run.log |
| Copy-Item Move-Item Remove-Item New-Item | Copy, move, remove and make files or folders | New-Item -ItemType Directory out |
| Select-String | Find lines that match | Select-String -Path *.nc -Pattern "G84" |
| Where-Object (?) | Keep the items that match | Get-Process | Where-Object CPU -gt 100 |
| ForEach-Object (%) | Do something to each item | 1..5 | ForEach-Object { $_ * 2 } |
| Select-Object Sort-Object Measure-Object | Pick columns, order, and count or total | Get-ChildItem | Sort-Object Length -Descending |
| | | Pass objects, not text, to the next command | Get-Service | Where-Object Status -eq Running |
| $name = value | A variable | $dia = 0.250 |
| "text $name" 'text' | Text with values filled in; text taken as written | "Dia: $dia" |
| -eq -ne -gt -ge -lt -le -like -match | Compare | if ($n -gt 10) { ... } |
| if elseif else foreach while switch | Flow | foreach ($f in $files) { ... } |
| function | Define a command of your own | function Get-Area($r) { [math]::PI * $r * $r } |
| Get-Process Stop-Process Get-Service | See and stop what is running | Stop-Process -Name notepad |
| Test-Path Join-Path Split-Path | Does it exist; build and take apart a path | if (Test-Path part.nc) { ... } |
| ConvertTo-Json ConvertFrom-Json Import-Csv Export-Csv | Read and write JSON and CSV | Import-Csv tools.csv |
| Get-Help Get-Command Get-Member | Find out what a command does and what an object holds | Get-Help Copy-Item -Examples |
The commands for keeping the history of a project.
Show the chart| Item | What it does | Example |
|---|---|---|
| git init git clone | Start a repository, or copy one | git clone https://example.com/shop.git |
| git status | What has changed | git status --short |
| git add | Stage changes for the next commit | git add src/part.js |
| git commit | Record the staged changes | git commit -m "Add tap drill chart" |
| git log | The history | git log --oneline -10 |
| git diff | What changed, line by line | git diff --stat |
| git branch git switch | List, make and move between branches | git switch -c fix-chart |
| git merge git rebase | Bring another branch's work into this one | git merge fix-chart |
| git pull git fetch | Get the latest from the server, with or without merging | git pull |
| git push | Send your commits to the server | git push origin main |
| git restore | Throw away changes in a file. There is no undo | git restore src/part.js |
| git stash | Set changes aside for later | git stash; git stash pop |
| git revert | Undo a commit with a new commit | git revert abc1234 |
| git tag | Name a point in the history | git tag v1.2 |
| git remote | The servers this repository knows | git remote -v |
| git blame git show | Who last changed each line; one commit in full | git show abc1234 |
| .gitignore | A file listing what git should leave alone | node_modules/ |
The tags that make up a web page.
Show the chart| Tag | What it is | Example |
|---|---|---|
| <!doctype html> <html> <head> <body> | The frame of every page | <html lang="en"> |
| <title> <meta> <link> | The page's name, facts about it, and linked files | <meta name="viewport" content="width=device-width"> |
| <h1> to <h6> | Headings, largest to smallest | <h1>Tap drill chart</h1> |
| <p> <br> <hr> | A paragraph, a line break, a rule | <p>Check the print.</p> |
| <a href> | A link | <a href="/quote">Get a quote</a> |
| <img src alt> | A picture, with words for when it cannot be seen | <img src="part.jpg" alt="Finished part"> |
| <ul> <ol> <li> | Bulleted and numbered lists | <ul><li>Aluminum</li></ul> |
| <table> <tr> <th> <td> | A table, its rows, heading cells and cells | <tr><th>Thread</th><td>1/4-20</td></tr> |
| <div> <span> | A block and an inline box with no meaning of their own | <div class="card">...</div> |
| <header> <nav> <main> <section> <footer> | The named parts of a page | <main id="main">...</main> |
| <form> <label> <input> <button> | A form and its controls | <input type="number" name="qty"> |
| <select> <option> <textarea> | A pick list and a large text box | <select><option>Aluminum</option></select> |
| id class | Name one element, or a group of them | <p class="note"> |
| <strong> <em> <code> | Strong importance, emphasis, code | <code>G84</code> |
| <script src> | Load a script file | <script src="/js/app.js"></script> |
| <!-- --> | A comment | <!-- chart starts here --> |
How a web page is styled: what to select, and the properties used most.
Show the chart| Item | What it does | Example |
|---|---|---|
| selector { property: value; } | The shape of every rule | p { color: #222; } |
| .name #name tag | Select by class, by id, by element | .card { padding: 16px; } |
| a b a > b a, b | Inside, directly inside, either one | .card > h3 |
| :hover :focus :first-child :not() | Select by state or position | a:hover { color: blue; } |
| color background | Text color and what is behind it | background: #f3f5f7; |
| font-family font-size font-weight line-height | The type | font-size: 17px; |
| margin padding border | Space outside, space inside, and the edge | padding: 12px 16px; |
| width height max-width min-height | Size | max-width: 62ch; |
| display: block | inline | none | flex | grid | How a box is laid out | display: grid; |
| flex gap justify-content align-items | Lay out along a row or column | display: flex; gap: 12px; |
| grid-template-columns | Lay out in columns | grid-template-columns: repeat(3, 1fr); |
| position: relative | absolute | fixed | sticky | Place a box out of the normal flow | position: sticky; top: 0; |
| px % em rem ch | Units: pixels, share of the parent, type size, character width | width: 50%; |
| @media | Rules for some screens only | @media (max-width: 600px) { ... } |
| --name var(--name) | A value kept under a name | color: var(--ink); |
| transition transform | Ease a change, and move or turn a box | transition: opacity .2s; |
| /* */ | A comment | /* chart table */ |
The share of a one-rep max a set is, by its reps and how hard it was. RPE 10 is nothing left, 9 is one rep in the tank, 8 is two. An average over many lifters: use it to pick a starting weight.
Show the chart| RPE | 1 rep | 2 reps | 3 reps | 4 reps | 5 reps | 6 reps | 7 reps | 8 reps | 9 reps | 10 reps |
|---|---|---|---|---|---|---|---|---|---|---|
| 10 | 100.0% | 95.5% | 92.2% | 89.2% | 86.3% | 83.7% | 81.1% | 78.6% | 76.2% | 73.9% |
| 9.5 | 97.8% | 93.9% | 90.7% | 87.8% | 85.0% | 82.4% | 79.9% | 77.4% | 75.1% | 72.3% |
| 9 | 95.5% | 92.2% | 89.2% | 86.3% | 83.7% | 81.1% | 78.6% | 76.2% | 73.9% | 70.7% |
| 8.5 | 93.9% | 90.7% | 87.8% | 85.0% | 82.4% | 79.9% | 77.4% | 75.1% | 72.3% | 69.4% |
| 8 | 92.2% | 89.2% | 86.3% | 83.7% | 81.1% | 78.6% | 76.2% | 73.9% | 70.7% | 68.0% |
| 7.5 | 90.7% | 87.8% | 85.0% | 82.4% | 79.9% | 77.4% | 75.1% | 72.3% | 69.4% | 66.7% |
| 7 | 89.2% | 86.3% | 83.7% | 81.1% | 78.6% | 76.2% | 73.9% | 70.7% | 68.0% | 65.3% |
| 6.5 | 87.8% | 85.0% | 82.4% | 79.9% | 77.4% | 75.1% | 72.3% | 69.4% | 66.7% | 64.0% |
| 6 | 86.3% | 83.7% | 81.1% | 78.6% | 76.2% | 73.9% | 70.7% | 68.0% | 65.3% | 62.6% |
Click a medication to see its official FDA label: what it is for, boxed warning, contraindications and adverse reactions, in the label's own words. The chart itself gives only the plain facts, by generic name: what kind of drug it is, what it is commonly used for, and whether it needs a prescription in the United States. Not medical advice.
Show the chart| Medication | Kind of drug | Commonly used for | In the United States |
|---|---|---|---|
| acetaminophen | Pain reliever and fever reducer | Pain, fever | Over the counter |
| ibuprofen | NSAID (anti-inflammatory) | Pain, fever, inflammation | Over the counter; higher strengths by prescription |
| naproxen | NSAID (anti-inflammatory) | Pain, inflammation | Over the counter; higher strengths by prescription |
| aspirin | NSAID and antiplatelet | Pain, fever; heart and stroke protection | Over the counter |
| diphenhydramine | Antihistamine | Allergy, itching, sleep aid | Over the counter |
| loratadine | Antihistamine | Allergy | Over the counter |
| cetirizine | Antihistamine | Allergy | Over the counter |
| famotidine | H2 blocker | Heartburn, ulcers | Over the counter and prescription |
| omeprazole | Proton pump inhibitor | Acid reflux, ulcers | Over the counter and prescription |
| pantoprazole | Proton pump inhibitor | Acid reflux, ulcers | Prescription |
| guaifenesin | Expectorant | Chest congestion | Over the counter |
| dextromethorphan | Cough suppressant | Cough | Over the counter |
| loperamide | Antidiarrheal | Diarrhea | Over the counter |
| docusate | Stool softener | Constipation | Over the counter |
| polyethylene glycol 3350 | Osmotic laxative | Constipation | Over the counter |
| lisinopril | ACE inhibitor | High blood pressure, heart failure | Prescription |
| losartan | Angiotensin receptor blocker | High blood pressure | Prescription |
| amlodipine | Calcium channel blocker | High blood pressure, angina | Prescription |
| metoprolol | Beta blocker | High blood pressure, angina, heart rate control | Prescription |
| carvedilol | Beta blocker | Heart failure, high blood pressure | Prescription |
| hydrochlorothiazide | Thiazide diuretic | High blood pressure, fluid retention | Prescription |
| furosemide | Loop diuretic | Fluid overload, swelling | Prescription |
| spironolactone | Potassium-sparing diuretic | Heart failure, fluid retention | Prescription |
| atorvastatin | Statin | High cholesterol | Prescription |
| simvastatin | Statin | High cholesterol | Prescription |
| rosuvastatin | Statin | High cholesterol | Prescription |
| clopidogrel | Antiplatelet | Preventing clots after a heart attack, stent or stroke | Prescription |
| warfarin | Anticoagulant | Preventing and treating blood clots | Prescription |
| apixaban | Anticoagulant | Preventing and treating blood clots | Prescription |
| rivaroxaban | Anticoagulant | Preventing and treating blood clots | Prescription |
| heparin | Anticoagulant, by injection | Preventing and treating blood clots | Prescription |
| enoxaparin | Anticoagulant, by injection | Preventing and treating blood clots | Prescription |
| nitroglycerin | Nitrate | Angina (chest pain) | Prescription |
| epinephrine | Adrenergic | Severe allergic reaction, cardiac arrest | Prescription |
| potassium chloride | Electrolyte | Low potassium | Prescription |
| metformin | Biguanide | Type 2 diabetes | Prescription |
| glipizide | Sulfonylurea | Type 2 diabetes | Prescription |
| insulin glargine | Long-acting insulin | Diabetes | Prescription |
| insulin lispro | Rapid-acting insulin | Diabetes | Prescription |
| levothyroxine | Thyroid hormone | Underactive thyroid | Prescription |
| prednisone | Corticosteroid | Inflammation, immune and allergic conditions | Prescription |
| methylprednisolone | Corticosteroid | Inflammation, immune and allergic conditions | Prescription |
| albuterol | Short-acting bronchodilator | Asthma and COPD wheezing | Prescription |
| fluticasone | Corticosteroid, inhaled or nasal | Asthma (inhaled); nasal allergy (spray) | Nasal spray over the counter; inhaler by prescription |
| montelukast | Leukotriene blocker | Asthma, allergy | Prescription |
| amoxicillin | Penicillin antibiotic | Bacterial infections | Prescription |
| amoxicillin with clavulanate | Penicillin antibiotic with an enzyme blocker | Bacterial infections | Prescription |
| azithromycin | Macrolide antibiotic | Bacterial infections | Prescription |
| cephalexin | Cephalosporin antibiotic | Bacterial infections | Prescription |
| ceftriaxone | Cephalosporin antibiotic, by injection | Bacterial infections | Prescription |
| ciprofloxacin | Fluoroquinolone antibiotic | Bacterial infections | Prescription |
| doxycycline | Tetracycline antibiotic | Bacterial infections | Prescription |
| sulfamethoxazole with trimethoprim | Sulfa antibiotic | Bacterial infections | Prescription |
| vancomycin | Glycopeptide antibiotic | Serious bacterial infections | Prescription |
| sertraline | SSRI antidepressant | Depression, anxiety | Prescription |
| fluoxetine | SSRI antidepressant | Depression, anxiety | Prescription |
| escitalopram | SSRI antidepressant | Depression, anxiety | Prescription |
| citalopram | SSRI antidepressant | Depression | Prescription |
| bupropion | Antidepressant | Depression, stopping smoking | Prescription |
| trazodone | Antidepressant | Depression, sleep | Prescription |
| gabapentin | Anticonvulsant | Nerve pain, seizures | Prescription |
| lorazepam | Benzodiazepine | Anxiety, seizures, sedation | Prescription, controlled substance |
| alprazolam | Benzodiazepine | Anxiety, panic | Prescription, controlled substance |
| zolpidem | Sleep medicine | Insomnia | Prescription, controlled substance |
| morphine | Opioid | Severe pain | Prescription, controlled substance |
| oxycodone | Opioid | Severe pain | Prescription, controlled substance |
| hydrocodone with acetaminophen | Opioid with a pain reliever | Moderate to severe pain | Prescription, controlled substance |
| fentanyl | Opioid | Severe pain, anesthesia | Prescription, controlled substance |
| tramadol | Opioid | Moderate pain | Prescription, controlled substance |
| naloxone | Opioid blocker | Opioid overdose | Nasal spray over the counter; other forms by prescription |
| ondansetron | Antiemetic | Nausea and vomiting | Prescription |
| tamsulosin | Alpha blocker | Enlarged prostate | Prescription |
Hoop and lengthwise stress in a closed cylinder with internal pressure. Holds when the wall is no more than a tenth of the inside radius.
hoop = p r / t, lengthwise = p r / (2 t), r = inside radius
Membrane stress in a sphere, or a hemispherical head, with internal pressure.
stress = p r / (2 t), r = inside radius
The internal pressure that puts a chosen stress in the wall of a pipe or tube. Put in yield for the pressure at yield, or your allowable stress for a working pressure.
P = 2 S t / OD
Stress at the bore of a thick cylinder with internal pressure only. The bore is where the stress is highest.
hoop at bore = p (ro² + ri²) / (ro² - ri²), radial at bore = -p, max shear = p ro² / (ro² - ri²)
Average shear stress across a round pin or bolt. Two shear planes is a clevis, where the pin is cut in two places.
shear stress = F / (planes x π d² / 4)
The force to shear a shape out of sheet or plate. The cut length is the distance all the way round the shape.
F = cut length x thickness x shear strength
The torque that gives a chosen clamp load. K is the nut factor: about 0.2 for plain dry steel, about 0.15 lubricated. It is an estimate; friction moves it a lot.
T = K d F
The area a threaded fastener carries tension on, and the stress under a load.
At = 0.7854 (D - 0.9743 / n)², n = threads per inch
The drill size that leaves a chosen percent of full thread for a 60 degree inch thread. 75 percent is the usual choice; 65 is easier on taps in tough material.
drill = D - 0.01299 x percent / n
Area, moment of inertia and section modulus for a beam's cross section. For a rectangle, the height is the side in line with the load.
rectangle I = b h³ / 12, round I = π d⁴ / 64, tube I = π (D⁴ - d⁴) / 64, S = I / c
The largest bending moment, stress and deflection for six common cases. The load is the total load on the beam. Take I and the distance to the outer fiber from the section calculator above.
stress = M c / I. Cantilever, end load: M = P L, y = P L³ / 3EI. Cantilever, even load: M = W L / 2, y = W L³ / 8EI. Simple, center load: M = P L / 4, y = P L³ / 48EI. Simple, even load: M = W L / 8, y = 5 W L³ / 384EI. Fixed ends, center load: M = P L / 8, y = P L³ / 192EI. Fixed ends, even load: M = W L / 12, y = W L³ / 384EI.
Shear stress at the surface and the angle of twist for a round shaft. Put 0 for the inside diameter of a solid shaft.
J = π (D⁴ - d⁴) / 32, shear stress = T D / (2 J), twist = T L / (G J)
The load at which a long, slender column buckles. K is the end factor: 1 pinned at both ends, 0.5 fixed at both, 0.7 fixed and pinned, 2 fixed and free. It does not apply to short, stocky columns, which crush first.
Pcr = π² E I / (K L)²
The torque a shaft carries for a power and a speed.
T = 63025 x hp / rpm (in·lbf)
Stress in a bar pulled or pushed along its length, and how much it changes length.
stress = F / A, change in length = F L / (A E)
Combines two normal stresses and a shear stress at a point into the principal stresses, the largest in-plane shear and the von Mises stress, and compares that with yield.
principal = (sx + sy) / 2 ± √(((sx - sy) / 2)² + txy²), von Mises = √(sx² - sx sy + sy² + 3 txy²)
How much a length changes with temperature. Typical expansion, in millionths per degree F: carbon steel about 6.5, stainless about 9.6, aluminum about 13, brass about 10.4, titanium about 4.8.
change = expansion x length x temperature change
Contact pressure for a solid shaft pressed into a hub of the same material, and the push it takes to slide it. The interference is on the diameter.
p = (E x interference / (2 d)) x (1 - (d / D)²), holding force = friction x p x π d L
Spindle speed from surface speed and cutter diameter, and table feed from the chip load per tooth.
rpm = 3.82 x SFM / diameter, feed = rpm x teeth x chip load
Volume cut per minute in milling, and the power it takes. Unit power, in hp per cubic inch a minute: aluminum about 0.3, carbon steel about 1, stainless about 1.3, titanium about 1.2.
removal rate = width x depth x feed, power = removal rate x unit power
X and Y for each hole on a bolt circle, from the center of the circle. The first hole sits at the start angle, measured from the X direction, and the rest go counterclockwise.
x = (D / 2) cos(angle), y = (D / 2) sin(angle)
Weight of a plate, a round bar or a round tube. Typical density, in pounds per cubic inch: carbon steel 0.284, stainless 0.29, aluminum 0.098, brass 0.307, copper 0.323, titanium 0.163, acetal 0.051.
weight = volume x density
The gauge block stack that sets a sine bar or sine plate to an angle.
stack = bar length x sin(angle)
Taper per foot, taper per inch and the angles for a round taper from its two diameters and length.
taper per inch = (D - d) / L, half angle = atan((D - d) / (2 L))
How far the point of a drill runs past the full diameter. Add it to the depth you program when the print gives full-diameter depth.
point length = (diameter / 2) / tan(point angle / 2)
Adds a chain of plus-or-minus tolerances two ways: worst case, and root sum square, which is the likely spread when the parts vary on their own. Put the tolerances in with commas between them.
worst case = sum of the tolerances, RSS = √(sum of their squares)
The reading over three wires for a 60 degree inch thread at its basic pitch diameter. Leave the wire at 0 to use the best wire size.
best wire = 0.57735 / n, pitch diameter = D - 0.64952 / n, over wires = pitch diameter + 3 W - 0.86603 / n
The usual tap drill for a metric thread: the diameter less the pitch, which leaves about three quarters of full thread.
drill = D - pitch
The helix angle of a thread at its pitch diameter. The lead is the pitch times the number of starts.
angle = atan(lead / (π x pitch diameter))
How deep to feed a countersink, from where its edge first touches the hole, to reach a head diameter.
depth = (head diameter - hole diameter) / 2 / tan(angle / 2)
The diameter a ball end mill really cuts on at a shallow depth, and the height of the ridge left between passes.
working diameter = 2 √(depth x (D - depth)), scallop = R - √(R² - (stepover / 2)²)
With a light side cut the chip is thinner than the feed per tooth. This gives the feed per tooth that brings the chip back to the thickness you want. It applies when the width of cut is under half the cutter.
factor = 1 / √(1 - (1 - 2 x width / D)²), feed per tooth = chip thickness x factor
The finish a turning insert leaves in theory. The real finish is rougher: use it to pick a feed, not to promise a number.
peak to valley = feed² / (8 x nose radius), Ra is about a quarter of that
Time in the cut for a length at a feed, over a number of passes.
time = length x passes / feed
The nearest inch fraction to a decimal, down to 64ths, and how far off it is.
nearest 64th, reduced
The rate of a round-wire coil spring, and its load at a deflection. Use the mean coil diameter (outside diameter less one wire) and the active coils.
rate = G d⁴ / (8 D³ N)
Stress in a square or flat key carrying torque. Half the key's height bears on the shaft and half on the hub.
force = 2 T / d, shear = force / (w L), bearing = force / (h L / 2)
Average stress on the throat of an equal-leg fillet weld. The throat is 0.707 of the leg. The length is the total length of weld carrying the load.
stress = F / (0.707 x leg x length)
Push and pull force of a cylinder at a pressure, and its speed for a flow. Put 0 for the flow to skip the speed.
push = p π bore² / 4, pull = p π (bore² - rod²) / 4, speed = 231 x gpm / area
The basic rating life nine bearings in ten reach, from the dynamic load rating in the maker's catalog and the load carried.
L10 = (C / P)^k million revolutions, k = 3 for ball, 10/3 for roller
Speed of the driven shaft, the ratio, and the belt speed. For gears, put tooth counts in place of the diameters and ignore the belt speed.
driven rpm = driver rpm x driver / driven, belt speed = π x diameter x rpm / 12
The main sizes of a standard full-depth spur gear from its tooth count and diametral pitch.
pitch diameter = N / P, outside diameter = (N + 2) / P, circular pitch = π / P, whole depth = 2.25 / P
The outward force on a weight turning about a center, such as a part held off center in a chuck or fixture.
F = W r (2 π rpm / 60)² / 386.09
The frequency a weight bounces at on a spring or any support with a known stiffness.
f = (1 / 2π) √(k x 386.09 / W)
How fast a liquid moves through a round bore at a flow rate.
velocity = 0.4085 x gpm / d² (ft/s)
The shear modulus of an ordinary metal from its modulus of elasticity and Poisson's ratio. About 0.29 for steel and 0.33 for aluminum.
G = E / (2 (1 + ν))
How much hotter the hub must be than the shaft to slip on with a chosen clearance. Typical expansion is in the thermal growth calculator.
temperature rise = (interference + clearance) / (expansion x diameter)
The loosest and tightest a hole and shaft can go together from their size limits. A negative clearance is interference.
loosest = largest hole - smallest shaft, tightest = smallest hole - largest shaft
Solves a right triangle from any two of its parts. Side a is opposite angle A, side b is beside it, and c is the long side.
c² = a² + b², sin A = a / c, cos A = b / c, tan A = a / b
The three angles and the area of a triangle from the lengths of its sides.
cos A = (b² + c² - a²) / (2 b c), area = √(s (s - a)(s - b)(s - c)), s = half the perimeter
Circumference and area of a circle from its diameter.
circumference = π d, area = π d² / 4
For a slice of a circle with a radius and an angle at the center: the arc length, the straight chord across it, the height of the arc above the chord, and the areas.
arc = r θ, chord = 2 r sin(θ / 2), height = r (1 - cos(θ / 2)), sector = r² θ / 2, segment = r² (θ - sin θ) / 2
Finds a radius you cannot measure directly: lay a straight edge across the arc, and measure its length and the gap at the middle.
r = (chord² / 4 + height²) / (2 x height)
The sizes of a shape with equal sides, from its number of sides and the distance across the flats. For a shape with an odd number of sides the flat-to-flat size is twice the distance from the center to a flat.
across corners = F / cos(180° / n), side = F tan(180° / n), area = n F² tan(180° / n) / 4
Volume and outside surface of the common solids. A cylinder or cone takes a diameter and a height; a sphere takes only the diameter; a box takes all three.
cylinder V = π d² h / 4, sphere V = π d³ / 6, cone V = π d² h / 12, box V = a b c
Turns a radius and an angle into X and Y, or X and Y into a radius and an angle. Angles are measured from the X direction, counterclockwise.
x = r cos θ, y = r sin θ, r = √(x² + y²), θ = atan2(y, x)
The straight-line distance from one X Y point to another, and the angle of that line from the X direction.
distance = √((x2 - x1)² + (y2 - y1)²), angle = atan2(y2 - y1, x2 - x1)
The straight-line distance between neighboring holes spaced evenly on a bolt circle, for checking with calipers or pins.
spacing = D sin(180° / n)
The position of a hole as a diameter zone, from how far its measured center is off in X and in Y. Compare it with the position tolerance on the print.
position = 2 √(dx² + dy²)
Pick a thread (inch, metric, or a taper pipe thread) and get its numbers: the diameters to cut before threading, the largest cutter that fits, the circle the tool center runs on, the feed to program at the tool center so the teeth see the chip load you want, and the time for one pass. Or leave it on Custom and type the size. An internal thread slows the center feed; an external thread speeds it up.
tooth feed = rpm x teeth x chip load. Internal: path = D - cutter, center feed = tooth feed x (D - cutter) / D. External: path = minor + cutter, center feed = tooth feed x (minor + cutter) / minor. Z per circle = 1 / n. Taper pipe: the diameter changes 1/16 in for each inch of depth
Pick a thread and the percent of thread you want: it gives the standard drill nearest that size and the percent of thread that drill really leaves.
inch: drill = D - 0.01299 x percent / n, then the nearest standard drill. metric: drill = D - 1.0825 x pitch x percent / 100
Finds the standard number, letter or fraction drill closest to a decimal size, with the next one under and over.
closest of the number, letter and 64th-inch fraction drills
The conversions that come up most between inch and metric prints.
1 in = 25.4 mm, 1 psi = 0.006895 MPa, 1 lbf = 4.448 N, 1 ft·lbf = 1.356 N·m, 1 hp = 0.7457 kW
The dose for one patient from an order written per kilogram. Pick the unit the order is written in.
dose = weight in kg × amount per kg; 1 lb = 0.4536 kg; 1 mg = 1000 mcg
Desired over have: how much liquid holds the ordered amount. The order and the label can be in different units: micrograms ordered from a vial marked in milligrams is worked out for you.
volume = ordered amount ÷ amount on hand × the volume it comes in, with both amounts first put in the same unit
How many tablets or capsules make up the ordered amount, whatever unit each is written in.
tablets = ordered amount ÷ strength of one tablet, with both first put in the same unit
An ordered rate, in whatever unit it is written, turned into mL an hour for the bag in hand. Weight is only used when the order is per kilogram.
mL/hr = amount needed each hour ÷ amount in each mL of the bag
The other way round: what dose a running pump rate is giving, in the unit you pick.
dose = mL/hr × amount in each mL of the bag, then per kilogram and per minute as the unit asks
The dose from an order written per square meter. Pick the unit the order is written in.
dose = amount per m² × body surface area
One amount in all three weight units, side by side.
1 g = 1000 mg; 1 mg = 1000 mcg
A volume over a time, as a pump rate and as drops a minute for gravity tubing.
mL/hr = volume ÷ hours; drops/min = volume × drop factor ÷ minutes
Surface area from height and weight, by the two formulas most often used.
Mosteller: √(cm × kg ÷ 3600); DuBois: 0.007184 × kg^0.425 × cm^0.725
The Devine ideal weight for a height, and the adjusted weight used when the actual weight is well above it.
Devine: 50 kg (male) or 45.5 kg (female) + 2.3 kg for each inch over 60; adjusted = ideal + 0.4 × (actual − ideal)
The estimate of kidney clearance that many dosing tables are written against.
(140 − age) × kg ÷ (72 × serum creatinine), × 0.85 for a female
What a percent strength or a ratio such as 1:1000 means in milligrams per milliliter.
1 percent = 1 g in 100 mL = 10 mg/mL; 1:N = 1 g in N mL = 1000 ÷ N mg/mL
How long what is left in the bag or syringe lasts at the running rate.
time = volume left ÷ rate
The conversions that sit between a scale, a label and an order.
1 lb = 0.4536 kg, 1 mg = 1000 mcg, 1 in = 2.54 cm, 1 fl oz = 29.57 mL, 1 tsp = 5 mL
Blood flow for a target written in milliliters per kilogram per minute. The target is yours to enter.
flow in L/min = weight in kg × mL/kg/min ÷ 1000
Blood flow for a target index in liters per minute per square meter, with the surface area worked from height and weight.
body surface area = √(cm × kg ÷ 3600); flow = index × body surface area
How the flow on the console compares with the full flow worked from the target index.
share = running flow ÷ (index × body surface area)
The oxygen carried in each deciliter: what is bound to hemoglobin plus the small part dissolved.
content = 1.34 × hemoglobin × saturation + 0.003 × oxygen pressure
The oxygen a blood flow carries each minute, and the same indexed to body surface area.
delivery in mL/min = flow in L/min × oxygen content × 10
The oxygen the membrane lung adds each minute, from blood sampled before and after it.
transfer in mL/min = flow in L/min × (content after − content before) × 10
On veno-venous support: the share of returned blood drawn straight back into the drainage line.
recirculation = (saturation before the membrane − mixed venous) ÷ (saturation after the membrane − mixed venous)
The sweep gas flow set against the blood flow, as a ratio and the other way round.
ratio = sweep gas flow ÷ blood flow; sweep = ratio × blood flow
The hematocrit to expect once a clear prime mixes with the patient's blood. The blood volume per kilogram is yours to enter.
hematocrit after = hematocrit × blood volume ÷ (blood volume + prime volume)
The mass of one mole, and how much of it each element makes up. Brackets and hydrates work: Ca(OH)2, CuSO4·5H2O.
molar mass = the atomic weight of every atom in the formula, added up
The mol calculator: one amount of a substance, three ways.
moles = grams ÷ molar mass; particles = moles × 6.022 × 10^23
The strength of a mix in moles per liter, from the mass dissolved and the final volume.
molarity = (grams ÷ molar mass) ÷ liters; grams needed = molarity × liters × molar mass
How much of a strong stock to measure out, and how much to add, for a weaker mix. Any strength unit works if it is the same for both.
strength 1 × volume 1 = strength 2 × volume 2
The moles of gas in a volume, and the room one mole takes up, at a pressure and temperature.
P × V = n × R × T, R = 0.082057 L·atm/(mol·K), K = °C + 273.15
The smallest whole numbers that leave every element equal on both sides. Numbers already in front are ignored and worked out again.
one equation an element, solved exactly in whole-number fractions
Give the equation and the mass of any one substance in it. The equation is balanced for you, and every other mass follows.
moles = grams ÷ molar mass; the balanced numbers set the mole ratio; grams = moles × molar mass
What a reaction really made against what the equation says it could.
percent yield = actual ÷ theoretical × 100
The pace a finishing time works out to, for the mile and the kilometer, with the speed.
pace = time ÷ distance; 1 mile = 1609.344 m
What a steady pace per mile comes to at the line.
time = pace per mile × distance in miles
The clock at every mark on the way to a goal time, run at an even pace. For a course, pick miles or kilometers; for the track, laps.
split at a mark = goal time × distance to the mark ÷ race distance
A goal time run with the second half faster than the first by a set amount.
first half = (goal + difference) ÷ 2; second half = (goal − difference) ÷ 2
A recent race, carried to another distance by the Riegel rule. A guide, not a promise: it assumes the training for the new distance.
new time = known time × (new distance ÷ known distance)^1.06
Score a meet from the order of finish. Type each runner's team in the order they crossed the line. Five score, seven count, and teams short of five are taken out first.
team score = the places of its first five finishers, added; low score wins; a tie goes to the better sixth runner
One team's score when you already have its runners' places. The first five count.
score = the five lowest places, added; a perfect score is 1 + 2 + 3 + 4 + 5 = 15
A team's times: the average of its first five, and how far its fifth runner is behind its first.
spread = fifth time − first time; average = the first five, added, ÷ 5
One pace, both ways, with the speed a treadmill would show.
pace per kilometer = pace per mile ÷ 1.609344
A record as a percentage, and how far it sits behind the leader's.
percentage = (wins + ties ÷ 2) ÷ games; games behind = ((leader wins − wins) + (losses − leader losses)) ÷ 2
The three hitting lines from a box score.
average = hits ÷ at bats; on-base = (hits + walks + hit by pitch) ÷ (at bats + walks + hit by pitch + sacrifice flies); slugging = total bases ÷ at bats
A pitcher's line. Type a third of an inning as .1 and two thirds as .2, the way a box score does.
ERA = earned runs × game length ÷ innings; WHIP = (walks + hits) ÷ innings
Basketball shooting from made and attempted, with the two lines that weigh the three-pointer and the free throw.
effective = (made + 0.5 × threes made) ÷ attempts; true shooting = points ÷ (2 × (attempts + 0.44 × free throw attempts))
The professional passer rating, the one that tops out at 158.3.
four parts, each held between 0 and 2.375: completions, yards, touchdowns and interceptions for each attempt; rating = their sum ÷ 6 × 100
The winning percentage a team's points for and against point to, and the record that goes with it.
expected percentage = for^n ÷ (for^n + against^n); n is about 1.83 for baseball, 2.37 for football, 14 for basketball
From a set you did (weight, reps and how hard it was) to an estimated one-rep max, and from there to the weight for the set you want next. RPE 10 is nothing left; 9 is one more rep in the tank; 8 is two.
one-rep max = weight ÷ the table's share for those reps at that RPE; next weight = one-rep max × the share for the target set
What a set to near failure points to for a single, by the three formulas most often quoted. They agree best under about 10 reps.
Epley: weight × (1 + reps ÷ 30); Brzycki: weight × 36 ÷ (37 − reps); Lombardi: weight × reps^0.10
The working weights for a one-rep max, in steps of five percent.
weight = one-rep max × percent ÷ 100, rounded to the plates on hand
Which plates go on each side of the bar for a target weight.
each side = (target − bar) ÷ 2, made up from the largest plates down
The total weight moved in a block of sets, and the average weight a rep.
volume = sets × reps × weight
A powerlifting total set against body weight, so lifters of different sizes can be compared. Both in kilograms.
DOTS = total × 500 ÷ (a + b × bw + c × bw² + d × bw³ + e × bw⁴), with one set of five numbers for men and one for women
An estimated top heart rate from age, and the five training zones worked from the reserve between resting and top (the Karvonen method).
top rate = 220 − age (or 208 − 0.7 × age); zone rate = resting + share × (top − resting)
The energy a body uses at rest, by the Mifflin-St Jeor formula, and across a day at an activity level.
at rest = 10 × kg + 6.25 × cm − 5 × age, + 5 (male) or − 161 (female); a day = at rest × activity factor
A rough count from the kind of work, body weight and time, using the standard activity ratings (METs).
kcal = MET × kg × hours; a MET is the energy used sitting still
Type a value and pick its unit; every other unit of length is listed.
each unit is held as its size in one base unit, so any two convert through it
Type a value and pick its unit; every other unit of area is listed.
each unit is held as its size in one base unit, so any two convert through it
Type a value and pick its unit; every other unit of volume is listed.
each unit is held as its size in one base unit, so any two convert through it
Type a value and pick its unit; every other unit of mass and weight is listed.
each unit is held as its size in one base unit, so any two convert through it
Type a value and pick its unit; every other unit of force and thrust is listed.
each unit is held as its size in one base unit, so any two convert through it
Type a value and pick its unit; every other unit of pressure and stress is listed.
each unit is held as its size in one base unit, so any two convert through it
Type a value and pick its unit; every other unit of torque is listed.
each unit is held as its size in one base unit, so any two convert through it
Type a value and pick its unit; every other unit of energy and work is listed.
each unit is held as its size in one base unit, so any two convert through it
Type a value and pick its unit; every other unit of power is listed.
each unit is held as its size in one base unit, so any two convert through it
Type a value and pick its unit; every other unit of speed and feed rate is listed.
each unit is held as its size in one base unit, so any two convert through it
Type a value and pick its unit; every other unit of flow rate is listed.
each unit is held as its size in one base unit, so any two convert through it
Type a value and pick its unit; every other unit of density is listed.
each unit is held as its size in one base unit, so any two convert through it
Type a value and pick its unit; every other unit of acceleration is listed.
each unit is held as its size in one base unit, so any two convert through it
Type a value and pick its unit; every other unit of angle is listed.
each unit is held as its size in one base unit, so any two convert through it
Type a value and pick its unit; every other unit of time is listed.
each unit is held as its size in one base unit, so any two convert through it
Type a value and pick its unit; every other unit of computer data is listed.
each unit is held as its size in one base unit, so any two convert through it
Type a temperature and pick its scale; the other three are listed.
°C = (°F − 32) × 5 ÷ 9; K = °C + 273.15; °R = °F + 459.67
Miles per gallon and liters per 100 kilometers run opposite ways: one goes up as the other comes down.
L/100 km = 235.2146 ÷ US mpg; km/L = US mpg × 0.425144
Type any medication, generic or brand. The links open its official FDA label on DailyMed (description, what it is for, contraindications, boxed warnings, adverse reactions, dosing) and the plain-language page on MedlinePlus. Both are run by the U.S. National Library of Medicine. This page does not write its own drug facts: the label is the source.
nothing is worked out here: the links carry the name you typed to the source's own search
The energy carried by one photon of light, from its wavelength, its frequency or its energy. Green light is about 532 nm.
E = h × f = h × c ÷ wavelength; h = 6.626 × 10^-34 J·s; c = 299,792,458 m/s; 1 eV = 1.602 × 10^-19 J
How much energy a light source or laser delivers in a time, and how many photons that is.
energy = power × time; photons = energy ÷ (h × c ÷ wavelength)
The energy locked in a mass, if all of it were turned to energy.
E = m × c²; c = 299,792,458 m/s
The power a hot surface gives off as light and heat, and the wavelength where its glow peaks.
power = emissivity × 5.670 × 10^-8 × area × T⁴ (T in kelvin); peak wavelength = 2.898 × 10^-3 ÷ T
How the intensity of light from a small source falls off as you move away.
intensity = power ÷ (4 × π × distance²)
How far a ray bends going from one clear material into another. Air is 1.000, water 1.333, glass about 1.52.
n1 × sin(angle 1) = n2 × sin(angle 2); critical angle = asin(n2 ÷ n1) when n1 is the larger
For sound, light or radio: one of wavelength and frequency from the other. Sound in air at room temperature travels about 343 m/s; light, 299,792,458 m/s.
speed = frequency × wavelength; period = 1 ÷ frequency
The energy of something moving, and its momentum.
energy = ½ × mass × speed²; momentum = mass × speed
A drop from a height with no air in the way: how long it takes, how fast it lands, and the energy it carries.
time = √(2 × height ÷ g); speed = √(2 × g × height); energy = mass × g × height; g = 9.80665 m/s²
Where something launched at an angle lands, with no air in the way.
time = (v·sin + √((v·sin)² + 2·g·h)) ÷ g; range = v·cos × time; top = h + (v·sin)² ÷ (2·g)
Newton's second law, and what a mass weighs.
force = mass × acceleration; weight = mass × g
The work done pushing or lifting, and the power it takes to do it in a given time.
work = force × distance; power = work ÷ time; 1 hp = 550 ft·lbf/s
Give any two of volts, amps, ohms and watts; the other two follow.
V = I × R; P = V × I = I² × R = V² ÷ R
How long one full swing takes, for a small swing.
period = 2 × π × √(length ÷ g)
The pull between any two masses. The defaults are the Earth and a 1 kg mass at its surface.
force = G × m1 × m2 ÷ distance²; G = 6.6743 × 10^-11
Along a smooth flow, pressure, speed and height trade off. Give the pressure, speed and height at one point and the speed and height at another; the pressure there follows. Steady flow, no friction, and a fluid that does not compress (air is fine below about 200 mph).
p1 + ½·ρ·v1² + ρ·g·z1 = p2 + ½·ρ·v2² + ρ·g·z2
The pressure a moving fluid would add if brought to rest: the push of a wind or a stream.
q = ½ × ρ × v²
The flow speed that a pitot tube's pressure difference stands for.
v = √(2 × Δp ÷ ρ)
What goes in comes out: a narrower pipe runs faster. For a fluid that does not compress.
area 1 × speed 1 = area 2 × speed 2; flow = area × speed
The flow through a venturi from the pressure drop between the inlet and the throat. Bernoulli and continuity together.
flow = Cd × throat area × √(2 × Δp ÷ (ρ × (1 − (throat ÷ inlet diameter)⁴)))
The flow through a sharp hole or orifice plate from the pressure across it. 0.61 is the usual coefficient for a sharp edge. For a gas, good only for small pressure drops.
Q = Cd × A × √(2 × Δp ÷ ρ)
How fast liquid leaves a hole below the surface of an open tank.
v = √(2 × g × head); flow = Cd × hole area × v
The pressure a column of liquid makes at its bottom, over and above what is on its surface.
pressure = ρ × g × depth
Whether a flow in a pipe is smooth (laminar) or churning (turbulent).
Re = speed × diameter ÷ kinematic viscosity; laminar under about 2,300, turbulent over about 4,000
The pressure lost to friction along a straight pipe. The friction factor is worked out for you from the Reynolds number and the roughness of the wall (0.00006 in for drawn tube, 0.0018 in for commercial steel).
Δp = f × (L ÷ D) × ½ × ρ × v²; f = 64 ÷ Re when laminar, else Swamee-Jain: 0.25 ÷ log10(ε ÷ (3.7·D) + 5.74 ÷ Re^0.9)²
The density of dry air at a pressure and temperature.
density = pressure ÷ (287.05 × T), T in kelvin, pressure in pascals
The pressure, temperature and density of the standard atmosphere at a height above sea level, up to 36,000 ft.
T = 288.15 − 0.0065 × h; p = 101,325 × (T ÷ 288.15)^5.25588; density = p ÷ (287.05 × T) (h in meters)
The speed of sound in air at a temperature, and how a speed compares with it.
speed of sound = √(1.4 × 287.05 × T), T in kelvin; Mach = speed ÷ speed of sound
The force of air or water on a body, from its coefficient and area. A flat plate face-on is about 1.2; a modern car about 0.3.
force = ½ × ρ × v² × area × coefficient
How much oil to add to an amount of gas for a mix ratio, with the common ratios listed beside it.
oil = gas ÷ ratio; 1 US gallon = 128 fl oz = 3,785 mL
The fuel a trip takes, and how far a tank goes.
fuel = distance ÷ miles per gallon; range = tank × miles per gallon
Miles per gallon from the distance driven and the fuel it took.
mpg = miles ÷ gallons; L/100 km = 235.21 ÷ mpg
How much concentrate and how much water fill a cooling system at a given strength.
concentrate = capacity × percent ÷ 100; water = the rest
The swept volume of an engine from its bore, stroke and number of cylinders.
displacement = π ÷ 4 × bore² × stroke × cylinders
Static compression ratio from the cylinder and everything above the piston at the top of its stroke. Enter a dish as a plus number and a dome as a minus.
ratio = (swept volume + clearance volume) ÷ clearance volume; clearance = chamber + gasket + deck + dish
Horsepower from torque and engine speed, or torque from horsepower.
hp = torque × rpm ÷ 5,252; torque = hp × 5,252 ÷ rpm
How fast the car is going at an engine speed in a gear.
mph = rpm × tire diameter ÷ (gear ratio × axle ratio × 336.13)
What a metric tire size works out to, and how a change of tire throws off the speedometer.
diameter = rim + 2 × width × aspect ÷ 100 ÷ 25.4; revs a mile = 63,360 ÷ (π × diameter)
A rough quarter-mile time and trap speed from power and weight. A rule of thumb for a car that hooks up well; traction, gearing and air change it.
elapsed time = 5.825 × (weight ÷ hp)^(1/3); trap speed = 234 × (hp ÷ weight)^(1/3)
The airflow an engine draws at its top speed, to size a carburetor or throttle body. A street engine fills about 85 percent; a race engine 100 or more.
cfm = cubic inches × rpm × volumetric efficiency ÷ 3,456
The injector flow an engine needs for a power level. Fuel use for each horsepower is about 0.50 for a gasoline engine without boost and 0.60 with; 80 percent is the usual limit on how long an injector stays open.
flow each = horsepower × fuel use for each hp ÷ (injectors × duty); cc/min = lb/hr × 10.5
The average speed of the piston at an engine speed.
mean piston speed in ft/min = stroke in inches × rpm ÷ 6
An axle ratio from its tooth counts, and the ratio that puts the engine speed back where it was after a change of tire size.
ratio = ring teeth ÷ pinion teeth; ratio to match = old ratio × new tire ÷ old tire
These are reference calculators. They use textbook formulas, with no safety factor and no code rules built in, and they run in your browser: nothing you type is sent to us. Check every result yourself before you rely on it. The medical tools are math aids, not medical advice. DM Machine and Tool LLC machines parts to your print; we do not offer design or engineering services.
Need the part made? Try our experimental auto quoter, or e-mail the print to info@DmMachinetool.com.