The simple ratio
A common scalar definition is n = limiting strength / applied stress. It is useful for quick screening, but the phrase “factor of safety” is incomplete unless you state which strength and which stress are being compared.
Yield and ultimate are different limits
For a ductile static component you may screen yielding using yield strength. Ultimate strength is a different failure criterion. Brittle fracture, fatigue, buckling, creep, contact stress and wear require different models.
Do not use one factor to cover every uncertainty
Load uncertainty, material scatter, manufacturing variation, environment, analysis error and consequences of failure may be handled differently by standards and company practices. A larger number is not automatically a better engineering model.
Allowable stress form
If a chosen criterion legitimately uses a required scalar factor, an allowable stress can be written as σallow = S/nrequired. Compare the relevant calculated stress with that allowable value.
Document the basis
Record the load case, material data source, temperature, failure mode and required margin. That makes the calculation reviewable rather than just producing a green number.
Machine-design verification
Check the full load spectrum, fatigue, lubrication, material data, environment, manufacturing variation and the relevant machine-element standard before release.