In your case it's necessary to replace the entire top case.
The price depends on the laptop model. Is it 13", 15" or 17" laptop?
For example, a new top case assembly (from PBParts) for a 13" laptop cost $219.
I assume labor to replace the top case will be arround $150.
Also, you can buy a new top cover and replace it yourself if you fell comfortable and save on labor.
You'll have to disassemble the entire laptop and transfer all internal components to the new top cover.
Here's an example of removing internal components from a MacBook Pro 13-inch unibody laptop.
Do you feel comfortable doing it yourself? If not, I strongly suggest finding a good repair shop and let them do it.