5-6 months is nowhere near too late! The sooner the better but you’re not in the danger zone. They can be spayed or neutered for years assuming they’re otherwise healthy and wouldn’t suffer complications from the anesthesia. You do not need to “let her have a litter first,” or go into heat first, which some people think is true for some reason.
Depending on the weight of the dog, it’s probably somewhere between $100 and $150. It varies around the country though.
You can have it done at any time, but it will cost more if the dog is pregnant or in heat when you get it done, so the sooner the better.
As to cost, that will vary but you can Google for “low cost spay coupon” with your city name and probably find a local vet who discounts. The main thing is to get it done before she goes into heat and possibly gets knocked up!
Definitely not too late. Cost depends on how big the dog is to some degree, and where you live. In the Chicago area, it cost me a couple hundred to get my 70 lb girl Zilla spayed. She was over a year; because of the chronic bladder infections she was getting as a puppy, but vet recommended that she go through one heat, as this usually helps clear things up (and it did).
The thing is the later you wait the dogs or cats may pick up habits related to sexual maturity. And even after they are fixed, they MAY retain those habits. But if you fix them before they get those sex related habits it’s better for you.
It can be done at any point (as long as the animal is healthy to withstand anesthesia, and many places won’t spay if the animal is less than two pounds). There are some benefits in spaying female dogs before their first heat, though (decrease chances of getting mammary cancer later on in life, no pyometra risk). Plus no need to worry about an accidental litter of puppies.
Like someone else said, it costs more to spay a dog that is in heat or pregnant.