You asked
Canon ef 40mm f 2 8 stm vs sigma 40mm f 1 4 dg hsm art?
The Sigma 40mm f/1.4 DG HSM Art is the better lens for dim light and shallow depth of field. At f/1.4 it gathers far more light than the Canon's f/2.8, so you can keep shutter speeds up indoors or at dusk, and it blurs backgrounds more strongly. It's marked as 40mm on full frame and frames like about 64mm on Canon APS-C. It's made for Canon EF, Nikon F, Sony E and L-Mount, so it can come with you if you change bodies. The trade-off is that f/1.4 is very thin: a face can be sharp while the ear is soft. For two people at different distances, stop down to f/2.8.
The Canon 40mm f/2.8 STM suits Canon EF owners who want a simpler lens. It has autofocus and fits the same full-frame and APS-C Canon bodies. At f/2.8 it gives about the depth of field of f/4.5 on Canon APS-C, which is easier to keep sharp across a group or a walk. It gives up light and background blur. Neither lens is stabilised, so neither steadies a moving subject. For that, the wider aperture matters more.
If you're weighing a fast standard prime generally, the guide's first-lenses advice puts a 50mm f/1.8 on full frame at the top for low light and people, and the portrait lens guide calls it the cheapest great lens made.
The material here doesn't include prices, so the guide can't say which lens costs less. Check each lens page's price section, and remember prices change.
Written by Claude from this site's pages.
The answer changes if
- If you shoot mainly in dim light or at moving subjects: Which 40mm lens is better for indoor sport on a Canon full-frame body?
- If you may switch camera brands later: Does the Sigma 40mm f/1.4 work on a Sony E-mount body?
- If you need a tighter budget: What's the cheapest fast standard prime for Canon EF full frame?
Ask next
- How much faster is the Sigma 40mm f/1.4 than the Canon 40mm f/2.8 for indoor portraits?
- Would a 50mm f/1.8 on my Canon full-frame body be a better first fast prime than a 40mm?
- Which Canon EF full-frame body pairs best with the Sigma 40mm f/1.4 for street photography?
- Is the Sigma 40mm f/1.4 too shallow for group photos at a wedding?
From these pages
This answer is for the question above. Each answer is written for the exact question in its address, so a question with its details in it (a budget, what you shoot, what you already have) gets an answer about those details. An answer draws on all 15 pages of the guide and its catalogue of 320 cameras and 1050 lenses. Another question gets its own answer at its own address, as words after /ask/. Or fill in your own: /ask/which-camera-for-{what-you-shoot}-under-{budget}-euros or /ask/which-lens-for-{what-you-shoot}-on-{your-camera}.