Leveling is one of the HARDEST parts of my job. It is impossible to know what the cost is going to be on any given job, and I cannot tell you until we are hired and my installer has demolished the existing floor and has a level on your subfloor. My best advice: choose a company you trust and take their professional advice.
If you have a concrete subfloor, flatness depends on both how it was poured and how the ground settled. We don’t worry much about cracks in the concrete, it is expensive and unnecessary to get them filled. It also doesn’t have to be 100% flat; it needs to be planed 3/16” in 10ft for flooring standards. You do not want dips that will cause inflections in a floating installation or air pockets in a glue down installation. There can be large valleys in the middle of a room or a drop off in the corner, or nothing at all. We use a combination of grinding high spots and leveling compound in low spots to level the floor and charge per hour of grinding or bag of leveling compound. If you are going to glue to whole floor has to be ground to open pores for adhesion and clear contaminates.
If you have a wood subfloor there can also be leveling issues, but there are different variable to solve them. If you were planning on nailing and there is need for leveling compound, you now need to glue. Often upstairs start to sag between joists every ten feet and you can get large variations. Sometimes it is possible to unscrew plywood and shave it down in the high spots above the joists, this will save money instead of using a lot of leveling compound to fill in the low spots. Upstairs you need a primer for the plywood and a more expensive leveling compound.
This is hard because it cannot be predicted, It is a large amount, and there is great variation from job to job so I cannot give accurate projections. But I can tell you it is one of the biggest attributes to a successful, sturdy installation.