Babies as young as six months old can distinguish between friendly dog barks and threatening ones.

The canine IQ test results are in: Even the average dog has the mental abilities of a 2-year-old child.

The finding is based on a language development test, revealing average dogs can learn 165 words (similar to a 2-year-old child), including signals and gestures, and dogs in the top 20 percent in intelligence can learn 250 words.

And the smartest?

Border collies, poodles, and German shepherds, in that order, says Stanley Coren, a canine expert and professor emeritus at the University of British Columbia. Those breeds have been created recently compared with other dog breeds and may be smarter in part because we've trained and bred them to be so, Coren said. The dogs at the top of the pack are on par with a 2.5-year-old.

Better at math and socializing

While dogs ranked with the 2-year-olds in language, they would trump a 3- or 4-year-old in basic arithmetic, Coren found. In terms of social smarts, our drooling furballs fare even better.

"The social life of dogs is much more complex, much more like human teenagers at that stage, interested in who is moving up in the pack and who is sleeping with who and that sort of thing," Coren told LiveScience.

Coren, who has written more than a half-dozen books on dogs and dog behavior, will present an overview of various studies on dog smarts at the American Psychological Association's annual meeting in Toronto.

"We all want insight into how our furry companions think, and we want to understand the silly, quirky and apparently irrational behaviors [that] Lassie or Rover demonstrate," Coren said. "Their stunning flashes of brilliance and creativity are reminders that they may not be Einsteins but are sure closer to humans than we thought."

Math test

To get inside the noggin of man's best friend, scientists are modifying tests for dogs that were originally developed to measure skills in children.

Here's one: In an arithmetic test, dogs watch as one treat and then another treat are lowered down behind a screen. When the screen gets lifted, the dogs, if they get arithmetic (1+1=2), will expect to see two treats. (For toddlers, other objects would be used.)

But say the scientist swipes one of the treats, or adds another so the end result is one, or three treats, respectively. "Now we're giving him the wrong equation which is 1+1=1, or 1+1=3," Coren said. Sure enough, studies show the dogs get it. "The dog acts surprised and stares at it for a longer period of time, just like a human kid would," he said.

These studies suggest dogs have a basic understanding of arithmetic, and they can count to four or five.

Basic emotions

Other studies Coren notes have found that dogs show spatial problem-solving skills. For instance, they can locate valued items, such as treats, find better routes in the environment, such as the fastest way to a favorite chair, and figure out how to operate latches and simple machines.

Like human toddlers, dogs also show some basic emotions, such as happiness, anger and disgust. But more complex emotions, such as guilt, are not in a dog's toolbox. (What humans once thought was guilt was found to be doggy fear, Coren noted.)

And while dogs know whether they're being treated fairly, they don't grasp the concept of equity. Coren recalls a study in which dogs get a treat for "giving a paw."

When one dog gets a treat and the other doesn't, the unrewarded dog stops performing the trick and avoids making eye contact with the trainer. But if one dog, say, gets rewarded with a juicy steak while the other snags a measly piece of bread, on average the dogs don't care about the inequality of the treats.

Top dogs

To find out which dogs had the top school smarts, Coren collected data from more than 200 dog obedience judges from the United States and Canada.

He found the top dogs, in order of their doggy IQ are:

Border collies Poodles German shepherds Golden retrievers Dobermans Shetland sheepdogs Labrador retrievers

At the bottom of the intelligence barrel, Coren would include many of the hounds, such as the bassett hound and the Afghan hound, along with the bulldog, beagle and basenji (a hunting dog).

"It's important to note that these breeds which don't do as well tend to be considerably older breeds," he said. "They were developed when the task of a hound was to find something by smell or sight." These dogs might fare better on tests of so-called instinctive intelligence, which measure how well dogs do what they are bred to do.

"The dogs that are the brightest dogs in terms of school learning ability tend to be the dogs that are much more recently developed," Coren said. He added that there's a "high probability that we've been breeding dogs so they're more responsive to human beings and human signals." So the most recently bred dogs would be more human-friendly and rank higher on school smarts.

Many of these smarty-pants are also the most popular pets. "We like dogs that understand us," Coren said.

We also love the beagle, which made it to the top 10 list of most popular dog breeds in 2008 by the American Kennel Club. That's because they are so sweet and socialable, Coren said. "Sometimes people love the dumb blonde," Coren said.

And sometimes the dim-wits make better pets. While a smart dog will figure out everything you want it to know, your super pet will also learn everything it can get away with, Coren warns.