Most shafts in rotating machines contain geometric discontinuities such as a step, groove, keyway, or radial hole. Stress concentration factors (SCF) are used to quantify the amount of intensification at these features. For instance, the SCF will increase with a smaller fillet radius relative to the shaft diameter at the base of a step, groove, or keyway. Therefore, it is good design practice to avoid sharp corners which cause high SCF's and stresses.
For shafts containing keyways, EDI recommends using at least a 2% fillet radius at the base to limit the SCF to 3. Square cut keyways (no appreciable fillet radius) can have much higher SCF's and stresses. The figure below shows the SCF of a keyway as a function of fillet radius (adapted from Peterson).


