In the first place, a lot depends on what you want. Shock absorbers or struts can cost anywhere from $40-$400 EACH, depending on the make and model of your vehicle and what you are looking for in terms of performance. If you need this question answered because you are facing your first replacement on a current vehicle, you can use the Make-Model-Year calculator at Shockwarehouse
to determine what products are available for your vehicle.
The good news is that in many cases, if you are just looking to replace original manufacturer equipment and maintain the ride your car came with, you will be spending on the lower end of that spectrum, probably around $250 or less for equipment to replace all four shocks/struts. Then figure on labor costs by a professional mechanic to run between $80-$120 per hour depending on your area.
Bear in mind, if you are driving a luxury vehicle, a vehicle that has a difficult access to struts, or even a lot of rust which can add to the time it takes to remove the old equipment.
You may also need a wheel alignment after the replacement, usually between $70 and $200, again depending on your vehicle.
Enter your vehicle information to find products for your vehicle.