Not for cost, so in reality, no. If you buy a prebuilt PC and have no idea what you're doing, and also don't value money, maybe.
Absolutely for cost, if you factor in quality of components. I don't have my Macbook Pro pulled apart right now, but I'll show you the difference between a computer with high quality components (a Thinkpad) and one with low quality components (a high spec ASUS).
These are the keyboards for a Thinkpad X230 (top) and an X220 (bottom).
This is the keyboard from the ASUS:
One is the same as the other, right?
Let's take a closer look. This is the X230 keyboard backing. Notice that it is a solid metal subframe.
The ASUS, not so much. A cheap, paper thin foil backing on top of a plastic shell. What's the big deal, you ask?
Here is one of the Thinkpad keyboards when held edge on.
Here's the ASUS keyboard held edge on.
Notice how floppy it is? Nice components versus cheap components. The Thinkpad keyboard is solid and underneath the keycaps, come with high quality NMB domes, for a superior typing feel, which results in faster, more accurate typing. Computer programmers swear by Thinkpad keyboards, for good reason. This ASUS, on the other hand, has much cheaper Chicony rubber domes, resulting in a mushy typing feel with significantly less key travel.
Here are the hinges on the ASUS:
Notice where they snapped from metal fatigue? A very common problem with consumer laptops everywhere. On the other hand, my Mac and my Thinkpad hinges are as good as the day I bought them. Mac and Thinkpad hinges simply don't fail.
When you take apart a computer, pay attention to the little things and you'll immediately see the differences between high quality components and low quality components. They'll jump out at you. These things all might look the same but they are not the same. Displays are another good quality metric. Even before Apple switched over to IPS only displays, Macs used much higher quality TN displays that had much better viewing angles, vibrancy and color accuracy except for all but the best displays on PC laptops. Keyboards, displays, trackpads, buttons, hinges, subframes, etc etc etc - there is a huge difference and you get what you pay for.
I could go on all night about this but I'll stop here.