Mechanical Engineering Calculator

Limits and Fits Calculator (ISO 286)

Calculate the exact upper and lower size limits for holes and shafts, determine max/min clearances, and identify the fit type based on standard ISO 286 tolerances.

Tolerance Zones Diagram

Zones shift dynamically based on selected tolerance classes.

EXAGGERATED SCALE
Zero Line (Nominal)Hole (H7)+21 µmShaft (g6)-7 µm-20 µm

Configuration

Basis Hole System

mm

Target diameter (0 to 120 mm).

Calculated Fit Results

Clearance FIT

Hole Limits (H7)

Upper Limit:25.021 mm
Lower Limit:25.000 mm

Shaft Limits (g6)

Upper Limit:24.993 mm
Lower Limit:24.980 mm

Max Clearance

0.041 mm

Min Clearance

0.007 mm

Engineering Code

Incorporate ISO 286 lookup logic directly into your design automation scripts.

Python
def calculate_fit(nominal_size, hole, shaft):
    """
    Basic ISO 286 lookup function for common preferred fits.
    Supports nominal sizes up to 120mm.
    """
    iso_data = [
        {'max': 3, 'H7': 10, 'g6_up': -2, 'g6_low': -8, 'p6_up': 12, 'p6_low': 6},
        {'max': 6, 'H7': 12, 'g6_up': -4, 'g6_low': -12, 'p6_up': 20, 'p6_low': 12},
        {'max': 10, 'H7': 15, 'g6_up': -5, 'g6_low': -14, 'p6_up': 24, 'p6_low': 15},
        {'max': 18, 'H7': 18, 'g6_up': -6, 'g6_low': -17, 'p6_up': 29, 'p6_low': 18},
        {'max': 30, 'H7': 21, 'g6_up': -7, 'g6_low': -20, 'p6_up': 35, 'p6_low': 22},
        {'max': 50, 'H7': 25, 'g6_up': -9, 'g6_low': -25, 'p6_up': 42, 'p6_low': 26},
        {'max': 80, 'H7': 30, 'g6_up': -10, 'g6_low': -29, 'p6_up': 51, 'p6_low': 32},
        {'max': 120, 'H7': 35, 'g6_up': -12, 'g6_low': -34, 'p6_up': 59, 'p6_low': 37}
    ]

    if nominal_size <= 0 or nominal_size > 120:
        raise ValueError('Size must be >0 and <=120 mm.')

    bin_data = next(b for b in iso_data if nominal_size <= b['max'])

    hole_max = nominal_size + (bin_data[hole] / 1000)
    hole_min = nominal_size

    shaft_max = nominal_size + (bin_data[f'{shaft}_up'] / 1000)
    shaft_min = nominal_size + (bin_data[f'{shaft}_low'] / 1000)

    return hole_max, hole_min, shaft_max, shaft_min

# Example Usage
D = 25
h_max, h_min, s_max, s_min = calculate_fit(D, 'H7', 'g6')
print(f"Hole Limits:  {h_max:.3f} / {h_min:.3f} mm")
print(f"Shaft Limits: {s_max:.3f} / {s_min:.3f} mm")
MATLAB implementation coming soon...

Technical Explanation: ISO 286 Limits and Fits

In mechanical engineering and manufacturing, it is impossible to machine a part to an exact, absolute dimension. The ISO 286 standard provides a globally recognized system for defining tolerances (the acceptable variation in size) and fits (the relationship between a mating hole and shaft), ensuring interchangeability of components across different manufacturers and production batches.

Technical Introduction

Engineers calculate limits and fits to specify how tightly two mating parts should assemble—whether they must slide freely, locate precisely with minimal play, or transmit torque through friction in a press fit. The ISO 286 system uses tolerance grades (IT01 to IT18) and fundamental deviation letters (A–ZC for holes, a–zc for shafts) to define acceptable size ranges.

This calculator implements the Basis Hole System with H-class holes, the most common engineering practice worldwide. It computes exact upper and lower dimensional limits, determines maximum and minimum clearances or interferences, and classifies the resulting fit type based on the selected tolerance combination.

The ISO 286 Tolerance System

ISO 286 defines two independent parameters for each tolerance class: the standard tolerance grade (IT) and the fundamental deviation. The IT grade (e.g., IT6, IT7) determines the tolerance zone width—the total permissible size variation. Fundamental deviation letters (e.g., H, g, k, p) position the tolerance zone relative to the nominal size.

Standard tolerance values depend on the nominal diameter. For grades IT5 to IT18, the tolerance factor i [µm] is calculated from the geometric mean diameter D [mm] of the size step:

i = 0.45 × ∛D + 0.001 × D

The IT grade tolerance equals a multiplier of i: IT6 = 10i, IT7 = 16i, IT8 = 25i, etc. Higher IT numbers indicate larger tolerances (looser fits) suitable for less precise manufacturing processes.

The Basis Hole System

This calculator utilizes the Basis Hole System, which is the most common engineering practice. In this system, the fundamental deviation of the hole is always zero (meaning the lower limit of an H-class hole is exactly the nominal size). To achieve different types of fits (sliding, pressing, etc.), the tolerance class of the shaft is varied while the hole remains constant.

This approach is economically favorable because holes are typically made with fixed-size tools (drills, reamers, broaches) which are difficult to adjust, whereas shafts are turned on lathes and can be easily machined to any specific dimension within the tolerance zone.

Fundamental Deviations and Limit Calculations

For an H-class hole, the lower deviation EI = 0 and the upper deviation ES = EI + IT. For shafts, fundamental deviations (denoted es for upper deviation, ei for lower deviation) follow empirical formulas based on the letter code and nominal diameter. For example, for g-class shafts: es = −(2.5 + 0.4×D) [µm] for certain size ranges.

Once fundamental deviations and IT grades are known:

  • Hole upper limit = Nominal + ES
  • Hole lower limit = Nominal + EI
  • Shaft upper limit = Nominal + es
  • Shaft lower limit = Nominal + ei

Fit Classifications

The relationship between hole and shaft tolerance zones determines the fit type:

  • Clearance Fit (e.g., H7/g6, H7/f7): The upper limit of the shaft is always smaller than the lower limit of the hole. There is always a gap, allowing for relative motion, lubrication, or easy assembly. Typical applications: sliding bearings, bushings, loose pulleys.
  • Transition Fit (e.g., H7/k6, H7/js6): Depending on the exact manufactured sizes within the tolerance zones, the parts may have a slight clearance or a slight interference. Often used for precise location where parts are assembled with a light mallet tap. Typical applications: gear hubs, coupling flanges, locating pins.
  • Interference / Press Fit (e.g., H7/p6, H7/s6): The lower limit of the shaft is always larger than the upper limit of the hole. The parts must be pressed together using force, or assembled using thermal expansion/contraction. They act almost as a single solid part once assembled. Typical applications: bearing races in housings, wheel hubs on axles, shrink-fit assemblies.

Clearance and Interference Calculations

Maximum clearance occurs when the hole is at its largest limit and the shaft at its smallest:

C_max = (Nominal + ES) − (Nominal + ei) = ES − ei

Minimum clearance (or maximum interference) occurs when the hole is at its smallest and the shaft at its largest:

C_min = (Nominal + EI) − (Nominal + es) = EI − es

If C_min > 0, the fit is clearance. If C_min < 0 and C_max > 0, the fit is transition. If C_max < 0, the fit is interference (negative clearance equals interference magnitude).

Input Parameters Explained

  • Nominal diameter: The basic size from which limits are derived [mm]. Tolerance values depend on which diameter step the nominal falls into (e.g., 18–30 mm, 30–50 mm).
  • Hole tolerance class: Letter-number combination (e.g., H7). The letter indicates fundamental deviation (H = zero lower deviation), the number indicates IT grade (7 = moderate precision, typical for reamed holes).
  • Shaft tolerance class: Letter-number combination (e.g., g6, k6, p6). The letter positions the shaft tolerance zone relative to nominal (g = clearance, k = transition, p = interference), the number indicates manufacturing precision (6 = finer than 7, typical for turned shafts).

Engineering Interpretation

The calculated limits define the acceptable manufacturing range for inspection. Parts measuring outside these limits are non-conforming. The fit classification guides assembly method: clearance fits assemble by hand, transition fits may require light tapping, interference fits require presses or thermal methods.

Tighter IT grades (IT5–IT7) increase manufacturing cost but improve precision and reduce play. Looser grades (IT9–IT11) reduce cost but increase variability. Select the coarsest tolerance that still ensures functional performance to minimize production expense.

Units and Conversions

This calculator uses millimeters for dimensions and micrometers (µm) for deviations. Key conversions:

  • 1 mm = 1,000 µm
  • 1 µm = 0.001 mm = 0.00003937 inches
  • Tolerance values in µm ÷ 1,000 = tolerance in mm

Assumptions and Limitations

  • ISO 286-1 and ISO 286-2 standard formulas for sizes up to 500 mm
  • Basis Hole System with H-class holes (fundamental deviation = 0)
  • Temperature at standard 20°C (68°F) for dimensional measurements
  • Ideal cylindrical geometry (no form or position tolerances considered)
  • No surface roughness or coating thickness effects
  • Static fit classification (does not account for thermal expansion, elastic deformation under load, or wear)

This calculator provides dimensional limits only. It does not calculate press-fit stresses, torque transmission capacity, fatigue life, or thermal effects—these require separate analysis using material properties, contact mechanics, and applicable design standards.

Practical Engineering Use

Limits and fits calculations appear in mechanical design of bearings, gears, couplings, hydraulic cylinders, piston assemblies, and precision locators. Engineers use ISO 286 to specify manufacturing tolerances on engineering drawings, ensure interchangeability of replacement parts, and select appropriate fits for functional requirements ranging from free-running bearings to permanent press-fit assemblies.

Real-World Engineering Cases

The Cracked Aluminum Housing

A junior engineer specified a heavy interference fit (H7/p6) to press a steel bearing into a thin-walled cast aluminum housing. Because they relied solely on the dimensional tables and skipped the FEA stress analysis in their CAD software, the massive hoop stress generated during the press-fit operation cracked the housings in half on the assembly line.

Engineering Lesson

Interference fits generate extreme radial stresses. Always calculate the resulting hoop stress on the hub/housing. If the wall is too thin, the part will yield or fracture. A lighter transition fit with a retaining compound (like Loctite) is often a safer alternative.

The Spinning Gear Hub

A drive gear was mated to a motor shaft using a standard keyway and a 'sliding clearance' fit (H7/g6) for easy assembly. Under heavy reversing loads, the micro-clearance allowed the gear to rock back and forth on the shaft, eventually shearing the key and destroying the keyway.

Engineering Lesson

For components transmitting high torque or reversing loads, a clearance fit is completely unacceptable, even with a keyway. A transition or interference fit (like H7/k6) is mandatory to eliminate backlash and prevent fatigue failure.

Frequently Asked Questions

What is the Basis Hole System in mechanical engineering?

In the Basis Hole System, the fundamental deviation of the hole is always zero (e.g., an H-class hole). To achieve different types of fits (sliding, pressing), the tolerance class of the shaft is varied. This is economically favorable because holes are typically made with fixed-size tools like drills or reamers which are hard to adjust.

What is a Clearance Fit?

A Clearance Fit occurs when the upper limit of the shaft is always smaller than the lower limit of the hole. There is always a gap, allowing for relative motion, lubrication, or easy assembly.

What is an Interference or Press Fit?

An Interference Fit occurs when the lower limit of the shaft is always larger than the upper limit of the hole. The parts must be pressed together using force or assembled using thermal expansion, acting almost as a single solid part once assembled.