I was thinking of building my own home cockpit. How much do you think a medium size would cost?

Depends on soooo many things:
Enclosed?
Motion?
Two-seater?
Instruments?
Switches?
LCD displays?
All handmade, or using real or modified parts?
There's a wide range of possibilities and budgeting any one of them depends primarily on how much work you're willing to do on it.
For what it's worth, I began by considering what exactly I would want. It started very simple...sort of a desktop control box with a car seat. I looked at the ready-made options first, and saw that I could save a lot by doing most of the building myself.
Then I found enough free materials to make a full enclosure- this means a lot more work, but I still haven't spent a lot of money. In the end, the greatest expense will be on the electronics.
I haven't kept track of the receipts, but offhand I'd say so far I've spent about $200 on hardware, materials, and tools, and after buying all the switches, controller boards, etc. the total will be about $500 to $600. That's not including the new PC, monitor and speakers, of course.
But if I were to buy a fully enclosed generic simpit, set up for twins, jets, etc , with enough switches, etc to avoid using the keyboard and mouse at all during flight, I'd be paying a helluva lot more... even a good desktop panel with yoke or stick and pedals could cost over $2000 total.
I'd highly recommend looking at the links posted above in this section; it might give you a better idea of what others have done on various budgets.