Mechanical Engineering Calculator

Shaft Diameter Calculator

Calculate the minimum required solid circular shaft diameter subjected to combined bending moment and torsional load using the maximum shear stress theory.

Combined Loading Schematic

Solid circular shaft subjected to torsion and bending

M = 500 N·mT = 1200 N·md

Input Parameters

N·m

Maximum bending moment.

N·m

Transmitted torsional moment.

MPa

Safe working shear stress of the material.

mm

Standard size to check against required minimum.

Design Tip

If the shaft has a keyway, it is common practice to increase the theoretical required diameter by applying a stress concentration factor.

Required Min. Diameter

47.96mm

Equivalent Twisting Moment (Te)

1,300 N·m

Proposed Size

50 mm

PASS — Proposed size is safe

Required diameter is 47.96 mm, and your proposed size is 50 mm.

Governing Formula

d = [ 16 × √(M² + T²) / (π × τ) ] ^ (1/3)
dmm

Minimum shaft diameter

MN·m

Bending moment

TN·m

Torque / Twisting moment

τMPa

Allowable shear stress

Calculation Assumptions

  • Solid circular cross-section
  • Maximum Shear Stress Theory
  • No axial loading considered
  • No stress concentration factors

Engineering Code

Incorporate this calculation into your own software or spreadsheet.

Python
import math

def calculate_shaft_diameter(M, T, tau_allow):
    """
    Calculate required solid shaft diameter under combined loading.
    
    M: Bending Moment (N.m)
    T: Torsion/Torque (N.m)
    tau_allow: Allowable shear stress (MPa or N/mm^2)
    
    Returns: Required diameter (mm)
    """
    if tau_allow <= 0:
        raise ValueError("Allowable stress must be > 0")

    # Convert moments to N.mm
    M_mm = M * 1000
    T_mm = T * 1000

    # Equivalent twisting moment
    Te_mm = math.sqrt(M_mm**2 + T_mm**2)

    # Required diameter using Max Shear Stress Theory
    d = ((16 * Te_mm) / (math.pi * tau_allow)) ** (1/3)
    return d

# Example
M = 500
T = 1200
tau = 60

d_req = calculate_shaft_diameter(M, T, tau)
print(f"Required Diameter: {d_req:.2f} mm")
MATLAB
function d = shaft_diameter(M, T, tau_allow)
    % Calculate required solid shaft diameter
    % M = Bending Moment (N.m)
    % T = Torque (N.m)
    % tau_allow = Allowable shear stress (MPa)

    if tau_allow <= 0
        error('Allowable stress must be > 0');
    end

    % Convert to N.mm
    M_mm = M * 1000;
    T_mm = T * 1000;

    % Equivalent twisting moment
    Te_mm = sqrt(M_mm^2 + T_mm^2);

    % Required diameter
    d = ((16 * Te_mm) / (pi * tau_allow))^(1/3);
end

% Example
M = 500;
T = 1200;
tau = 60;

d_req = shaft_diameter(M, T, tau);
fprintf('Required Diameter: %.2f mm\n', d_req);
Excel Formula (Replace M, T, Tau with cell refs)
=((16*SQRT((M*1000)^2+(T*1000)^2))/(PI()*Tau))^(1/3)

Example Calculation

Determine the required diameter for a solid steel shaft subjected to a bending moment of 500 N·m and a torque of 1,200 N·m. The allowable shear stress for the material is 60 MPa (N/mm²).

d = [ 16 × √((500 × 1000)² + (1200 × 1000)²) / (π × 60) ]^(1/3)
d = 47.96 mm

Technical Explanation: Shaft Design under Combined Loading

Transmission shafts are almost always subjected to both torsion (from the transmitted power) and bending (from gears, pulleys, sprockets, or belt tensions). The ASME code for the design of transmission shafting uses the maximum shear stress theory together with empirical shock and fatigue factors to size the shaft diameter for strength under combined loading.

Technical Introduction

Engineers calculate minimum shaft diameter to ensure the shaft can safely transmit required torque while resisting bending moments from overhung components, belt tensions, gear reactions, and self-weight. Undersized shafts fail by yielding or fatigue; oversized shafts add unnecessary cost, weight, and bearing loads.

This calculator implements the ASME maximum shear stress equation for solid circular shafts. It combines bending moment and torque into an equivalent twisting moment, applies shock and fatigue factors, and solves for the minimum diameter that keeps maximum shear stress below the allowable limit.

Governing Formula

The fundamental ASME equation for a solid shaft under combined bending and torsion is:

d³ = (16 / (π × τ_allow)) × √[(K_b × M)² + (K_t × T)²]

Where d is the required shaft diameter [mm], τ_allow is the allowable shear stress [MPa], M is the maximum bending moment [N·mm], T is the torque [N·mm], K_b is the combined shock and fatigue factor for bending, and K_t is the combined shock and fatigue factor for torsion.

The term √[(K_b × M)² + (K_t × T)²] represents the equivalent twisting moment—the single torque value that would produce the same maximum shear stress as the actual combined loading. This formulation arises from Mohr's circle analysis of the stress state at the shaft surface.

Derivation from Maximum Shear Stress Theory

For a solid circular shaft, bending produces normal stress σ_b = 32M / (πd³) and torsion produces shear stress τ = 16T / (πd³). At the critical point on the shaft surface, these stresses combine. According to the maximum shear stress theory (Guest's or Tresca's theory), the maximum shear stress is:

τ_max = √[(σ_b / 2)² + τ²] = (16 / (πd³)) × √[M² + T²]

Setting τ_max equal to the allowable shear stress τ_allow and solving for d yields the basic equation. The ASME code modifies this by applying factors K_b and K_t to account for dynamic loading conditions, giving the final design formula shown above.

Allowable Shear Stress Determination

The ASME code specifies allowable shear stress as the more conservative of two limits based on material strength:

τ_allow = min(0.30 × S_y, 0.18 × S_ut)

Where S_y is the yield strength (0.2% proof stress) [MPa] and S_ut is the ultimate tensile strength [MPa]. The 0.30 × S_y limit prevents yielding under static overload; the 0.18 × S_ut limit provides a safety margin against fatigue failure under cyclic loading.

If a keyway is present, the allowable shear stress is reduced by 25%:

τ_allow_keyway = 0.75 × τ_allow

This reduction accounts for stress concentration at the keyway corners and the reduced cross-sectional area. Even with generous fillet radii, keyways significantly reduce fatigue strength and must never be ignored in shaft design.

Shock and Fatigue Factors (K_b and K_t)

The factors K_b and K_t account for dynamic loading conditions that increase effective stresses beyond static values. Typical ASME-recommended values:

  • Gradually applied / steady load: K_b = 1.5, K_t = 1.0 (e.g., motor shafts with uniform torque)
  • Suddenly applied, minor shock: K_b = 1.5–2.0, K_t = 1.0–1.5 (e.g., gear drives with moderate impact)
  • Heavy shock loading: K_b = 2.0–3.0, K_t = 1.5–3.0 (e.g., punch presses, crushers, reciprocating machinery)

Bending factors K_b are typically higher than torsional factors K_t because bending stresses are more sensitive to load fluctuations and stress concentrations. Select factors based on the driven equipment type and service conditions.

Input Parameters Explained

  • Torque (T): Torsional moment transmitted by the shaft [N·mm or N·m]. Can be calculated from power and speed: T = (P × 60) / (2π × N), where P is power [W] and N is rotational speed [RPM].
  • Bending moment (M): Maximum bending moment at the critical section [N·mm or N·m]. Determined from shaft layout, bearing positions, and applied loads (gear forces, belt tensions, pulley weights, chain pulls).
  • Yield strength (S_y): Material 0.2% proof stress [MPa]. Common values: mild steel 250 MPa, medium carbon steel 350–450 MPa, alloy steel 500–900 MPa.
  • Ultimate strength (S_ut): Material tensile strength [MPa]. Used to apply the 0.18 × S_ut limit. Typical ratios: S_ut / S_y ≈ 1.5–2.0 for steels.
  • Shock/fatigue factors (K_b, K_t): Dimensionless multipliers based on loading type. Higher values increase required diameter to account for dynamic effects.

Engineering Interpretation

The calculated diameter is the minimum required for strength at the critical section. In practice, engineers round up to the nearest standard shaft size (e.g., 40, 45, 50 mm) and verify deflection, critical speed, and bearing compatibility. The result assumes the shaft is made from homogeneous, isotropic material with no surface treatments or residual stresses.

This calculation addresses static strength under combined loading with empirical fatigue factors. It does not replace a full fatigue analysis using S-N curves, Goodman or Gerber criteria, or fracture mechanics for high-cycle applications. For critical shafts (turbines, aerospace, high-speed machinery), perform detailed fatigue analysis per ASME B106.1 or equivalent standards.

Units and Conversions

This calculator uses consistent SI-derived units. Key conversions:

  • 1 N·m = 1,000 N·mm
  • 1 MPa = 1 N/mm²
  • Power to torque: T [N·m] = (P [kW] × 9,549) / N [RPM]
  • Shaft diameter in mm; stress in MPa; moments in N·mm

Assumptions and Limitations

  • Solid circular cross-section (no hollow shafts)
  • Homogeneous, isotropic ductile material (valid for steels, not brittle materials)
  • Maximum shear stress theory applies (conservative for ductile materials)
  • Combined bending and torsion only (no axial load included)
  • Static or quasi-static loading with empirical dynamic factors
  • Stress concentrations other than keyways not explicitly modeled
  • No surface finish, size, or reliability factors (use separate fatigue analysis for critical applications)
  • No deflection or rigidity checks (separate calculation required for stiffness-limited designs)
  • No critical speed or whirling analysis (required for high-speed shafts)

This calculator provides preliminary sizing only. Final shaft design must also consider fatigue life, surface finish effects, stress concentrations at fillets and grooves, deflection limits for gear/pulley alignment, critical speed to avoid resonance, bearing selection, and manufacturing tolerances.

Practical Engineering Use

Shaft design calculations appear in mechanical design of gearboxes, pump drives, conveyor systems, machine tool spindles, automotive drivetrains, and industrial machinery. Engineers use the ASME equation to select shaft diameters during preliminary layout, then refine with detailed stress analysis, finite element modeling, and prototype testing for high-value or safety-critical applications.

Real-World Engineering Cases

Marine Propeller Shaft Failures

In marine engineering, propeller shafts often fail not due to pure torque, but because of bending moments induced by the ship's hull deflection and uneven wake distribution acting on the propeller blades.

Engineering Lesson

Never design a power transmission shaft based on engine torque alone. Bending moments from overhanging loads (cantilevered pulleys or propellers) often dictate the required diameter.

Industrial Gearbox Shaft Fatigue

A conveyor gearbox shaft sheared at a stepped diameter section. The engineers sized the shaft correctly for combined bending and torsion but ignored the stress concentration factor caused by a sharp corner radius at a bearing seat.

Engineering Lesson

The theoretical minimum diameter is a baseline. You must increase this diameter at critical sections where keyways, snap ring grooves, or diameter steps create stress concentrations.

Frequently Asked Questions

What formula is used to calculate shaft diameter?

The formula based on maximum shear stress is d = [16 × √(M² + T²) / (π × τ)]^(1/3), where M is the bending moment, T is torque, and τ is the allowable shear stress.

What is the equivalent twisting moment?

The equivalent twisting moment (Te) is the pure torque that would produce the same shear stress as the combined loads. It is calculated as Te = √(M² + T²).

Does this account for keyways?

No. If your shaft has keyways, standard practice dictates you should decrease the allowable shear stress by 25% or multiply the theoretical required diameter by an appropriate stress concentration factor.

Engineering calculations provided by this tool are for educational and preliminary design purposes. Always verify calculations, loading conditions, fatigue factors, stress concentrations, and design requirements before using results in a final mechanical design.