5-AXIS CALCULATORS5-axis calculations
Small calculations for checking a 5-axis program. Everything is calculated in your browser; the values you enter are not sent anywhere.
F value for G93 inverse time feed
F_inv = 1 / T = F_mm / L (T: minutes)[3][1][2]
- F_inv: the F value commanded in G93 (1/min)
- T: time to finish the block (min)
- F_mm: desired feed rate at the tool tip (mm/min)
- L: tool tip travel distance in the block (mm)
While G93 is active, write F in every cutting block (the previous F is not carried over). Example from NIST and Siemens: F2 finishes the move in 0.5 min.
Ball end mill tilt angle (angle that keeps the tool center out of the cut)
θ = arccos(1 − ap / R)[4]
Cutting with the tool center, where the surface speed is almost 0, crushes the material rather than cutting it and tends to leave scratches. In KISTEC's experiment (R3, ap0.3), the tool center engaged at 15° and did not touch at 30° or more (formula value 25.8°). However, in the same experiment surface roughness Rz was smaller without tilting, so decide by whether you put more weight on visual gloss or on roughness. The formula works when the depth of cut ap is no more than the ball radius R (above R it shows "—").
Angles from the tool direction vector
Tilt angle = arccos( K / √(I² + J² + K²) ), swivel angle = atan2( J, I )[5]
The vector points from the tool tip toward the tool holder; its length doesn't matter. Siemens example: (1, 1, 1) → tilt 54.73561°, swivel 45°. The actual rotary axis angles (A, B, C) depend on the machine configuration, and there may be two solutions.
How a rotary axis turns (shortest direction and reducing the displayed value)
Δ = ((target − current + 180) mod 360) − 180 Reduced value = displayed value mod 360[6]
On a rotary axis that counts beyond 360°, 350° → 10° can take the long way around, −340°. Some controls have a function that turns the shortest way (such as Heidenhain M126) or one that reduces the displayed value before moving (M94 on the same control). If you command 180° while the displayed value is 538°, the axis turns −358°.
How much a center-of-rotation offset shows up on the workpiece (calibration; tool length in RTCP)
ΔX = ex(1 − cosθ) + ey·sinθ, ΔY = −ex·sinθ + ey(1 − cosθ), |Δ| = 2·√(ex² + ey²)·sin(θ/2)[7][8][9]
- ex, ey: center offset at height h (µm). ex = δx + h·β/1000, ey = δy − h·α/1000
- δx, δy: offset of the center of rotation in X and Y (µm; E_X0C and E_Y0C for the C axis)
- α, β: tilt of the rotary axis about the X and Y axes (µrad; E_A0C and E_B0C for the C axis)
- h: height from the center of rotation (table surface) (mm)
- θ: angle the rotary axis is turned (deg)
Rule of thumb for tilt: 10 µrad = 0.01 mm/m ≈ 2″. At height h, a tilt acts the same as a center offset of h × tilt. The sign (which way it shifts) depends on how the machine coordinate system is defined, so look mainly at the magnitude. Error motions of the rotary axis and errors of the linear axes are not included.
Reading it backwards: if the step between opposing faces cut at 0° and 180° is 20 µm, the center offset is about 10 µm.
Check examples: δx = 10 µm with θ = 30°, 90°, 180° → 5.18, 14.14, 20.00 µm. δx = δy = 5 µm, θ = 180° → ΔX = ΔY = 10 µm, |Δ| = 14.14 µm (the same size as in a research example where turning the C axis from 0° to 180° shifted the part by about 10 µm in both X and Y). Tilt β = 10 µrad, h = 200 mm, θ = 180° → 4.00 µm.
Lateral = ΔL·sinθ, vertical = ΔL(1 − cosθ), total = 2ΔL·sin(θ/2)[10][9][11]
Tool center point control (RTCP) calculates the tip position from the registered tool length. If the tool length is off by ΔL, the tip is off by ΔL in Z when pointing straight down, and when the tool is tilted that offset rotates with the tool. What is shown here is the mismatch with the surface cut with the tool pointing straight down.
Check examples: ΔL = 20 µm, θ = 30° → lateral 10.00, vertical 2.68, combined 10.35 µm. θ = 90° → 20.00, 20.00, 28.28 µm.
For the concept and diagrams, see Rotary axis location errors and RTCP accuracy.
How far the C axis turns near a singularity
C speed = ω / sin d; total C rotation while passing through the interval ±T ≈ 180° − 2·atan(d / T)[12][13][14]
- d: angle from the singularity (deg)
- ω: rate of change of tool orientation (deg/s)
- T: interval around the singularity (deg)
A singularity is an orientation in which the tool axis is parallel to a rotary axis centerline (with a B/C head, B = 0° with the tool pointing straight down). If the path passes directly over it, C would have to flip 180° instantly; if the speed and acceleration limits cannot keep up, the path distorts or the feed drops. Actual behavior depends on the NC's interpolation and singularity handling.
Check examples: d = 5° → 11.5 times, 1° → 57.3 times, 0.1° → 573 times. d = 0.5°, T = 2° → about 152°. Real example (ICAM's explanation): while A moved by less than 2° (0.827° → −0.001° → 1.043°), C turned about 180° (−0.075° → −90° → −179.72°).
For how to avoid it, and diagrams, see Common 5-axis mistakes (singularities).
5-Axis Machining Calculators FAQ
- How is the G93 inverse-time feed rate F calculated?
- F (1/min) = desired tool-tip feed rate Vf (mm/min) ÷ tool-tip path length L (mm) for that block. Because F is the reciprocal of the block execution time in minutes (F = 1/T), an F word must be programmed on every block during G93 mode.
- What tilt angle prevents cutting with the zero-speed center of a ball end mill?
- Tilt the tool by more than θ = arccos(1 − ap / R), where R is the ball radius and ap is the axial depth of cut. For R = 3 mm and ap = 0.3 mm, arccos(0.9) ≈ 25.84°; in shop practice a 15°–30° lead or tilt angle is commonly used.
- If the C-axis pivot center is off by 10 µm, how much step error appears between 0° and 180°?
- Rotating the table 180° doubles the pivot offset error on the workpiece: a 10 µm center offset produces a 20 µm step between faces machined at 0° and 180°. Measuring that step and halving it gives the pivot offset.
Other 5-axis machining pages

5-axis machining basics
The difference between 3+2 and simultaneous 5-axis machining, the advantages of 5 axes, and terminology.

5-axis machine configurations
The three types (head-head, table-table, head-table) with their advantages and drawbacks, the names and directions of rotary axes A, B, C, vertical vs. horizontal machines, and multitasking machines.

5-axis NC functions
Tool center point control, tilted-plane commands and 3D tool radius compensation. A comparison of commands by NC maker, G93 inverse time feed, tool length and center of rotation, and RTCP accuracy.

Calibration, collision, workholding and tools
Location errors of the rotary axes (center offset and tilt), R-test, ballbar and touch probe, kinematics calibration and heat, accuracy test standards, collision checking, 5-axis vises, and how to tilt a ball end mill.

Common 5-axis mistakes
Singularities (which orientation makes the C axis swing), the two solutions of a rotary axis and the long way around, feed units, tool length error, forgetting to cancel a tilted plane, and calibrating while cold. A checklist to verify on the shop floor.

5-axis CNC simulator
Run G43.4, G43.5 and G68.2 programs in the browser and cut in 3D — side holes and undercuts included — with warnings for TCP-off drift, singularities and holder collisions. Four exercises.

CAD/CAM
CAM workflow, toolpaths, a list of software, and data formats.
Sources
- National Institute of Standards and Technology (NIST), “The NIST RS274NGC Interpreter – Version 3 (NISTIR 6556, 2000)”
- Siemens AG, “SINUMERIK 840D sl/828D Fraisage ISO, Manuel de programmation 02/2012 (6FC5398-7BP40-3DA0, French edition)”
- Haas Automation, Inc., “G93 Inverse Time Feed Mode (G-code reference page)”
- Kanagawa Institute of Industrial Science and Technology (KISTEC), Tomohiro Yokota, “A Study of Machined Surface Quality in Ball End Milling,” KISTEC Research Report 2020
- Siemens AG, “Milling with SINUMERIK — 5-axis machining Manual, Edition 05/2009 (DocOrderNo. 6FC5095-0AB10-0BP1)”
- DR. JOHANNES HEIDENHAIN GmbH, “TNC 640 User's Manual Conversational Programming, NC Software 340590-01 / 340591-01 / 340594-01, 4/2012 (892903-20)”
- Japan Society for Precision Engineering (S. Ibaraki), “Measurement and Compensation of Motion Errors of Five-Axis Machine Tools (review)”, Journal of the Japan Society for Precision Engineering 78(9) (2012) (in Japanese)
- Fuji Technology Press (S. Ibaraki, Y. Ota), “Error Calibration for Five-Axis Machine Tools by On-the-Machine Measurement Using a Touch-Trigger Probe, Int. J. of Automation Technology 8(1) (2014)”
- Elsevier (S. Ibaraki et al., Hiroshima University repository), “A machining test to evaluate thermal influence on the kinematics of a five-axis machine tool, Int. J. Machine Tools and Manufacture 163, 103702 (2021)”
- Renishaw plc, "Application note: ISO 10791-6 using QC20 ballbar"
- FIDIA S.p.A., “Functions for 5-axis machine tools (RTCP)”
- HAL (archives ouvertes), “Kinematical smoothing of rotary axis near singularity point”
- University of Bath (R.J. Cripps et al.), “Singularities in five-axis machining: cause, effect and avoidance, Int. J. Machine Tools and Manufacture 116 (2017) (abstract)”
- ICAM Technologies, “How to eliminate unnecessary rotary moves due to singularity (2014)”