Type of repair needed- The cost of your boiler repair will depend greatly on what part of your boiler needs to be repaired/replaced. For example, replacing your thermostat is a lot less expensive than replacing your circulator pump or the gas valve. After taking a look at your boiler, a tech will be able to tell you exactly what part is malfunctioning and the cost to repair or replace it.
Repair vs. replace-Depending on the part that needs to be repaired (and the severity of the damage), it may be in your best interest to replace your entire system altogether. This will obviously increase the cost of your boiler service, but may save you money in the long run.
Whether or not your boiler is under warranty- When your boiler was installed, it likely came with two warranties: a parts warranty and a labor warranty. The parts warranty is usually covered by the boiler manufacturer and covers defective parts for a certain amount of time (usually 1-5 years). A labor warranty is usually covered by the company or contractor who installed your boiler and covers any issues dependent on how the boiler was installed. If either (or both) of those warranties are still valid, it could end up saving you quite a bit on your boiler repair.
Whether your boiler has been maintained- The more often you have your boiler maintained, the less likely you'll face expensive repairs. So, if you've had your boiler maintained annually since its installation, the cost of your repair will likely be less expensive than if you've had your boiler for years and never had a technician perform a tune up on the system.