M4 Bolt Size Chart: Dimensions, Length & Head Size

An M4 bolt is a metric fastener with a nominal thread diameter of 4 mm. It is widely used in machinery, electronics, automotive components, furniture, brackets, enclosures, appliances, and general mechanical assemblies. However, knowing that a fastener is “M4” is only the starting point. The correct bolt length, thread pitch, head size, drive type, and material grade can vary depending on the bolt design and application.

This M4 bolt size chart explains the most important dimensions in one place, including thread diameter, standard coarse pitch, common bolt lengths, hex head dimensions, socket-head dimensions, and practical measurement methods. It also explains how M4 bolts compare with nearby metric sizes such as M3 and M5, and how to choose the right length for your application.


M4 Bolt Dimensions at a Glance

The term M4 describes the nominal outside diameter of the threaded portion, not the bolt’s overall length or head dimensions. For the common coarse-thread version, an M4 bolt normally has a 0.7 mm thread pitch.

The following chart provides the basic dimensions commonly associated with M4 metric bolts.

DimensionM4 Standard / Common ValueNotes
Nominal diameter4 mmThread designation
Coarse thread pitch0.7 mmCommon general-purpose pitch
Thread spacing0.7 mmDistance between thread crests
Nominal diameter in inches0.1575 in4 mm ÷ 25.4
Common bolt lengths6–60 mm+Depends on application and product
Common hex head AF7 mmTypical standard M4 hex bolt
Typical hex socket size7 mmFor many M4 hex-head bolts
Common socket-head hex key3 mmTypical M4 socket-head cap screw
Length measurementUnder head to tipFor most standard bolts

These values should be treated as typical dimensions rather than a universal specification for every M4 fastener. Head dimensions and drive sizes depend on the bolt type and applicable standard.


What Does M4 Mean on a Bolt?

The M4 designation identifies a metric thread with a nominal diameter of approximately 4 mm. The letter M indicates a metric thread, while the number 4 represents the nominal major diameter in millimeters.

For example, an M4 × 20 bolt means:

  • M4 = approximately 4 mm nominal thread diameter
  • 20 = 20 mm nominal bolt length
  • The standard coarse pitch is normally 0.7 mm unless another pitch is specified

The designation does not tell you whether the bolt has a hex head, socket head, pan head, flange head, or another configuration. Those are separate characteristics.

M4 × 20 Example

An M4 × 20 mm bolt has a nominal thread diameter of 4 mm and a nominal length of 20 mm.

A complete description could be something like:

M4 × 20, hex head, metric coarse thread, property class 8.8

That description gives considerably more information than simply calling the item an M4 bolt.


M4 Bolt Thread Size and Pitch

Thread pitch is one of the most important specifications when selecting an M4 fastener. Pitch is the distance from one thread crest to the next, measured parallel to the bolt axis.

For the common M4 coarse thread:

M4 × 0.7

This means the threads are spaced 0.7 mm apart.

An M4 bolt can also be manufactured with a fine thread, depending on the applicable standard and manufacturer. Fine-thread versions should never be assumed to have the same pitch as the common coarse-thread version.

M4 Coarse vs. Fine Thread

M4 Thread TypePitchTypical Use
M4 coarse0.7 mmGeneral-purpose fastening
M4 fineLess than 0.7 mmSpecialized applications

If replacing an existing M4 bolt, match the thread pitch as well as the diameter. A bolt can have the correct 4 mm nominal diameter but still be incompatible if its pitch does not match the mating nut or threaded hole.


M4 Bolt Length Chart

Bolt length is normally specified in millimeters and is measured according to the bolt’s head style. For conventional hex-head and socket-head bolts, length is generally measured from directly underneath the head to the threaded tip.

Common M4 bolt lengths include the following:

M4 Bolt LengthApprox. InchesCommon Application Examples
6 mm0.24 inThin brackets and small assemblies
8 mm0.31 inLight-duty components
10 mm0.39 inElectronics and brackets
12 mm0.47 inGeneral assemblies
16 mm0.63 inBrackets and machinery
20 mm0.79 inGeneral mechanical fastening
25 mm0.98 inThicker components
30 mm1.18 inMulti-layer assemblies
35 mm1.38 inDeeper fastening applications
40 mm1.57 inLonger assemblies
50 mm1.97 inThick components or spacers
60 mm2.36 inExtended fastening applications

Not every manufacturer supplies every length. Standard length increments can also differ between product ranges.

How Long Should an M4 Bolt Be?

The correct length depends on the combined thickness of everything being clamped, including washers, brackets, plates, spacers, and other components.

A useful starting calculation is:

Required bolt length ≈ total clamped thickness + required thread engagement

For example, if two components together are 10 mm thick and the design calls for approximately 8–10 mm of usable engagement, an M4 bolt around 20 mm long may be appropriate, depending on the head style, washer arrangement, threaded-hole depth, and application.

Avoid choosing a bolt simply because it “looks long enough.” Excessive length can interfere with internal components, while insufficient engagement can reduce the reliability of the joint.


M4 Hex Bolt Head Size

The head size depends on the specific hex-head bolt standard. A common standard M4 hex bolt uses a 7 mm across-flats (AF) head.

“Across flats” means the distance measured between two opposite flat sides of the hexagonal head.

M4 Hex-Head DimensionTypical Value
Nominal thread diameter4 mm
Across flats7 mm
Typical wrench size7 mm
Thread pitch, coarse0.7 mm

The 7 mm wrench size is therefore commonly associated with a standard M4 hex-head bolt.

However, head dimensions can vary with the bolt standard. A reduced-head, flange-head, small-head, or other specialty M4 fastener may use different dimensions.

Why Head Size Matters

Head dimensions affect:

  • Tool access
  • Clearance around the fastener
  • Clamping surface area
  • Installation space
  • Compatibility with existing components
  • Appearance of the finished assembly

If you are replacing an existing bolt, measure the old head rather than assuming every M4 bolt has the same head dimensions.


M4 Socket Head Cap Screw Dimensions

An M4 socket head cap screw is different from a conventional external-hex bolt. Instead of using a wrench on the outside of the head, it has an internal hexagonal drive.

A common M4 socket-head cap screw uses a 3 mm hex key, although the exact drive specification should be confirmed against the applicable standard or manufacturer’s data.

Typical dimensions include:

M4 Socket-Head FeatureCommon Value
Thread diameter4 mm
Coarse pitch0.7 mm
Typical hex key3 mm
Head diameterAbout 7 mm
Head heightAbout 4 mm

These dimensions are associated with common standardized socket-head cap screw designs. Variations exist for low-head, button-head, countersunk, and other socket-drive styles.

M4 Socket Head vs. M4 Hex Bolt

The two fasteners can have the same M4 thread but completely different heads.

FeatureM4 Hex BoltM4 Socket Head Cap Screw
Thread diameter4 mm4 mm
Typical coarse pitch0.7 mm0.7 mm
DriveExternal hexInternal hex
Typical tool7 mm wrench3 mm hex key
Head styleHexagonalCylindrical
Typical advantageEasy wrench accessCompact tool access

The thread may be interchangeable in principle, but the head and drive are not.


M4 Bolt Head Types

“M4” identifies the thread size, while the head style determines how the fastener is installed and how it sits against the workpiece.

Hex Head

A traditional hex-head M4 bolt has six external flats and is tightened with a wrench or socket. It is useful when a conventional wrench can access the fastener.

Socket Head

Socket-head cap screws have a cylindrical head with an internal hexagonal drive. They are useful where a compact wrenching area is desirable.

Button Head

Button-head socket screws have a rounded, low-profile appearance. They can be useful where a less prominent head is preferred.

Countersunk Head

Countersunk M4 screws are designed to sit approximately flush with a suitably prepared countersunk surface. They are selected when a protruding head would interfere with surrounding components.

Flange Head

Flange-head designs incorporate an integral flange beneath the head. This can provide a larger bearing surface without requiring a separate washer.

The correct head style depends on clearance, access, clamping requirements, appearance, and the design of the mating components.


How to Measure an M4 Bolt

If you have an unidentified fastener and need to determine whether it is M4, measure more than just its diameter.

1. Measure the Thread Diameter

Use a caliper to measure across the outside of the male threads.

A reading close to 4 mm suggests an M4 nominal diameter, although thread wear, measurement technique, plating, and manufacturing tolerances can affect the reading.

2. Determine the Thread Pitch

Measure the distance between adjacent thread crests or use a metric thread pitch gauge.

For a standard coarse M4 thread, the pitch is 0.7 mm.

3. Measure the Bolt Length

For most conventional bolts and screws, measure from underneath the head to the end of the fastener.

Do not include the head in the length measurement unless the relevant fastener design specifically defines length differently.

4. Measure the Head

For a hex-head bolt, measure:

  • Across flats
  • Across corners if needed
  • Head height

For a socket-head screw, measure:

  • Head diameter
  • Head height
  • Internal hex size

5. Identify the Head Style

Finally, determine whether the fastener is hex-head, socket-head, button-head, countersunk, flange-head, or another design.

This information is important when buying an exact replacement.

Discover More:


M4 Bolt Size in Inches

M4 is a metric designation, but approximate inch conversions can be useful when comparing fasteners.

The nominal 4 mm diameter converts to approximately 0.1575 inch.

Metric MeasurementApprox. Inch Equivalent
4 mm diameter0.1575 in
6 mm length0.236 in
8 mm length0.315 in
10 mm length0.394 in
12 mm length0.472 in
16 mm length0.630 in
20 mm length0.787 in
25 mm length0.984 in
30 mm length1.181 in
40 mm length1.575 in
50 mm length1.969 in
60 mm length2.362 in

These are unit conversions, not claims that an inch-size fastener is interchangeable with an M4 bolt.


M3 vs. M4 vs. M5 Bolt Size

M4 sits between M3 and M5 in the common metric fastener range. Comparing these sizes makes it easier to understand how diameter affects fastener selection.

Metric SizeNominal DiameterCommon Coarse PitchTypical Standard Hex AF
M33 mm0.5 mm5.5 mm
M44 mm0.7 mm7 mm
M55 mm0.8 mm8 mm

M4 provides a useful middle ground for many compact mechanical assemblies.

It is larger than M3, giving a greater nominal thread diameter, while remaining smaller than M5. The correct choice, however, should be determined by the engineering requirements of the joint rather than by size alone.

Discover More:


How to Choose the Correct M4 Bolt Length

Selecting the right M4 bolt length involves more than measuring the thickness of one component.

Consider the entire fastening stack.

Measure the Clamped Material

Add the thicknesses of all components being secured.

For example:

Component A: 4 mm
Component B: 6 mm
Washer: 1 mm

Total clamped thickness:

4 + 6 + 1 = 11 mm

The bolt must be long enough to provide the required engagement in the nut or threaded hole after passing through the complete stack.

Consider Thread Engagement

The required thread engagement depends on the materials, joint design, loading conditions, thread quality, and engineering requirements.

For a critical application, do not rely on a generic rule of thumb. Follow the design specification or manufacturer’s engineering guidance.

Avoid Excessive Length

An excessively long bolt can:

  • Bottom out in a blind hole
  • Interfere with moving components
  • Contact electrical or mechanical parts
  • Create an unnecessary protrusion
  • Reduce available clearance

The ideal bolt is not necessarily the longest one that fits.

Discover More:


Common M4 Bolt Applications

M4 fasteners are frequently found in relatively compact assemblies where a small metric thread is appropriate.

Common applications include:

  • Electronics enclosures
  • Small machinery
  • Control panels
  • Brackets
  • Appliance components
  • Furniture hardware
  • Instrument assemblies
  • Robotics
  • 3D printer components
  • Computer hardware
  • Automotive trim and components
  • Light mechanical assemblies
  • Equipment frames

The suitability of an M4 bolt depends on the actual loads and joint requirements. A fastener should not be selected solely because its physical size appears appropriate.


M4 Bolt Materials and Grades

M4 bolts are available in many materials and strength classes.

Common options include carbon steel, alloy steel, stainless steel, brass, and other materials.

Stainless steel M4 bolts are popular where corrosion resistance and appearance are important. Steel fasteners may be selected when higher mechanical strength is required.

For steel metric fasteners, property classes such as 8.8, 10.9, and 12.9 are commonly encountered. These numbers relate to mechanical strength classifications and should not be treated as interchangeable with material names.

When selecting a bolt for a load-bearing or safety-critical application, consider:

  • Property class
  • Tensile strength
  • Yield strength
  • Corrosion environment
  • Temperature
  • Thread engagement
  • Joint design
  • Installation torque
  • Compatibility with the mating material

For critical assemblies, always use the manufacturer’s or engineering specification rather than relying on a generic online size chart.


M4 Bolt and Nut Compatibility

An M4 bolt normally needs an appropriately matched M4 nut or threaded hole.

For a common coarse-thread assembly, the bolt and nut should have matching thread diameter and pitch.

For example:

M4 × 0.7 bolt + M4 × 0.7 nut

Do not assume that every M4 nut will automatically match every M4 bolt. Fine-thread and coarse-thread versions can have the same nominal diameter while having different pitches.

Thread condition also matters. Dirt, damaged threads, coatings, plating, or mismatched standards can affect assembly.


M4 Bolt Installation Tips

Correct dimensions are only part of successful fastening. Installation technique also matters.

Use the Correct Tool

Use the wrench, socket, hex key, or driver that properly matches the head.

A poorly fitting tool can damage the drive surfaces.

Avoid Cross-Threading

Start the bolt carefully and make sure it engages the mating thread smoothly. If the bolt immediately feels tight or misaligned, stop and inspect the threads.

Use a Washer When Appropriate

A washer can help distribute the load under the head or nut and protect the mating surface. Whether one is required depends on the joint design.

Do Not Over-Tighten

Small M4 fasteners can be damaged by excessive torque. The appropriate tightening torque depends on the fastener material, grade, lubrication, thread condition, and joint design.

For important applications, use the specified torque value rather than an arbitrary number.


Common M4 Bolt Selection Mistakes

Several mistakes occur when people identify a bolt only by its diameter.

Mistake 1: Assuming M4 Means One Head Size

M4 describes the nominal thread diameter. Different head designs can have different dimensions and tool requirements.

Mistake 2: Ignoring Thread Pitch

Two M4 fasteners can have different pitches. Always verify the pitch when replacing an existing fastener.

Mistake 3: Measuring the Wrong Bolt Length

For most standard bolt and screw styles, length is measured from under the head to the tip, not from the top of the head.

Mistake 4: Treating Inch and Metric Threads as Interchangeable

An approximately 4 mm diameter does not mean an inch-thread fastener is equivalent to M4. Thread pitch and profile must match.

Mistake 5: Choosing Length by Appearance

A bolt that looks suitable may have insufficient thread engagement or may be unnecessarily long.

Mistake 6: Ignoring Strength and Material

A dimensionally correct M4 bolt may still be unsuitable if its material, grade, corrosion resistance, or temperature capability does not meet the application requirements.


M4 Bolt Size Chart Quick Reference

For quick identification, the following summary brings together the most useful M4 specifications.

M4 SpecificationCommon Value / Description
Nominal thread diameter4 mm
Coarse thread designationM4 × 0.7
Coarse pitch0.7 mm
Typical standard hex head AF7 mm
Typical standard hex-head wrench7 mm
Typical socket-head hex key3 mm
Common lengths6, 8, 10, 12, 16, 20, 25, 30, 40, 50, 60 mm
Approx. diameter in inches0.1575 in
Length measurementGenerally under head to tip
Typical thread systemMetric

Remember that this is a general reference chart. Exact dimensions should be verified against the relevant fastener standard and manufacturer’s product data, particularly for specialty head designs.


Frequently Asked Questions About M4 Bolts

What size is an M4 bolt?

An M4 bolt has a nominal thread diameter of 4 mm. The common coarse-thread version has a 0.7 mm pitch, designated M4 × 0.7.

What is the standard M4 bolt pitch?

The common coarse pitch for M4 is 0.7 mm. Specialized fine-thread versions can use a different pitch, so the pitch should be confirmed when exact compatibility is important.

What size wrench fits an M4 bolt?

A common standard M4 hex-head bolt uses a 7 mm wrench or socket. However, head styles and standards vary, so specialty M4 bolts may require another tool size.

What size Allen key fits an M4 bolt?

A typical M4 socket-head cap screw uses a 3 mm hex key. The exact drive size depends on the particular head design and applicable standard.

How is M4 bolt length measured?

For most conventional hex-head and socket-head bolts, measure from directly underneath the head to the threaded end. Countersunk fasteners are measured differently because the head is designed to sit within the material.

Is M4 the same as 4 mm?

M4 has a nominal thread diameter of 4 mm, but the complete fastener specification includes other dimensions such as pitch, length, head geometry, and material or strength class.

Is M4 larger than M3?

Yes. M4 has a nominal diameter of 4 mm, while M3 has a nominal diameter of 3 mm. Their standard coarse thread pitches are also different.

Is M4 larger than M5?

No. M5 is larger. M5 has a nominal diameter of 5 mm, compared with 4 mm for M4.

Can an M4 bolt fit an M4 nut?

Yes, provided the thread pitch, thread form, and applicable specifications match. For the common coarse version, an M4 × 0.7 bolt is paired with an M4 × 0.7 nut.

What is the most common M4 bolt length?

There is no single universal M4 length. Lengths such as 10, 12, 16, 20, and 25 mm are commonly encountered, but the correct length depends on the thickness and design of the assembly.


Final Takeaway

An M4 bolt has a nominal thread diameter of 4 mm, with M4 × 0.7 being the common coarse-thread designation. Standard bolt lengths are available in many increments, while head dimensions depend on whether the fastener is a conventional hex bolt, socket-head cap screw, button-head screw, countersunk fastener, or another design.

For a common M4 hex-head bolt, a 7 mm across-flats head and 7 mm wrench size are typical. A common M4 socket-head cap screw typically uses a 3 mm hex key. These values are useful for identification, but exact dimensions should always be checked against the relevant standard or manufacturer’s specification.

When choosing an M4 fastener, verify diameter, thread pitch, length, head style, drive size, material, strength class, and application requirements. Matching all of these characteristics is much more reliable than selecting a bolt based on diameter alone.