Unfortunately, there is no magic length of time or milestone age when a puppy can be considered fully housetrained and there are many factors that go into how quickly a puppy can be potty trained. Your puppy’s age plays a major role during the initial phase of potty training, as a very young puppy won’t have the muscle control necessary to hold it for long periods of time.

Understand your puppy's particular breed behavior and needs. Research your dogs breed traits and special needs or any behavior that you should be aware of and look out for. For example, If your puppy is a tiny little chihuahua, their bladder will be very small and they will need to urinate more frequently; accidents will happen even if they are well trained.
Don’t punish your dog if they pee inside. Regardless of all those old training ideas punishment isn’t a good deterrent for house training. Yelling at your dog after the fact just confuses them and makes them nervous around you. If you catch your did in the act you can try to get their attention & move them outdoors. If you’re successful & they continue going once you get outside praise them like crazy.
Konrad Lorenz, an Austrian scientist who is regarded as developing the foundations of ethological research,[16] further popularised animal behaviorism with his books, Man Meets Dog and King Solomon's Ring.[17] Lorenz stated that there were three essential commands to teach a dog: "lie down" (stay where you are), "basket" (go over there) and "heel" (come with me).[18]

Marian Breland Bailey played a major role in developing empirically validated and humane animal training methods and in promoting their widespread implementation.[14] Marian was a graduate student under B.F. Skinner. Her first husband Keller Breland also came to study with Skinner and they collaborated with him, training pigeons to guide bombs. The Brelands saw the commercial possibilities of operant training, founding Animal Behavior Enterprises (ABE). In 1955, they opened the "I.Q. Zoo" as both a training facility and a showcase of trained animals. They were among the first to use trained animals in television commercials, and the first to train dolphins and whales as entertainment, as well as for the navy.[14] Keller died in 1965, and in 1976 Marian married Bob Bailey, who had been director of marine mammal training for the navy. They pioneered the use of the clicker as a conditioned reinforcer for training animals at a distance.[13] ABE went on to train thousands of animals of more than 140 species.[14] Their work had significant public exposure through press coverage of ABE-trained animals, bringing the principles of behavior analysis and operant conditioning to a wide audience.[15]
Electronic training involves the use of an electric shock as an aversive. Common forms are collars which can be triggered remotely, or that are triggered by barking, fencing that delivers a shock when a dog wearing a special collar crosses a buried wire, and mats that can be placed on furniture to deliver a shock. Some aids deliver an aversive such as a spray of citronella when triggered.[65] The use of electric shock aversives for training dogs is the subject of considerable controversy. Supporters claim that the use of electronic devices allows training at a distance and the potential to eliminate self-rewarding behaviour, and point out that properly used, they have less risk of stress and injury than mechanical devices, such as choke chains. Opponents cite the risks of physical and psychological trauma associated with incorrect or abusive use.[66]
Based on the principles of social learning, model-rival training uses a model, or a rival for attention, to demonstrate the desired behaviour.[69] The method was used by Irene Pepperberg to train Alex the African Grey Parrot to label a large number of objects. McKinley and Young undertook a pilot study on the applicability of a modified version of the model-rival method to the training of domestic dogs, noting that the dog's origins as a member of large and complex social groups promote observational learning. The model-rival training involved an interaction between the trainer, the dog, and a person acting as a model-rival, that is, a model for desired behaviour and a rival for the trainer's attention. In view of the dog, a dialogue concerning a particular toy commenced between the trainer and the model-rival. The trainer praised or scolded the model-rival depending on whether the model-rival had named the toy correctly. It was found that the performance times for completion of the task were similar for dogs trained with either operant conditioning or the model rival method. In addition, the total training time required for task completion was comparable for both methods.[70]
Teach your dog where he SHOULD take his potty breaks, instead of trying to use punishment to teach him where he should NOT go potty. If you focus on what you want him to do, instead of what you don’t want your dog to do, you’ll get faster results. Teaching your dog where it’s OK to go is very important, and one of the reasons why so many people are never successful in potty training their dogs.
Dogs have become closely associated with humans through domestication and have also become sensitive to human communicative signals. Generally, they have a lot of exposure to human speech, especially during play, and are believed to have a good ability to recognize human speech. Two studies investigated the ability of a single dog that was believed to be exceptional in its understanding of language. Both studies revealed the potential for at least some dogs to develop an understanding of a large number of simple commands on the basis of just the sounds emitted by their owners. However the studies suggested that visual cues from the owner may be important for the understanding of more complex spoken commands.[81]
Every dog needs to learn to walk on a leash. Besides the fact that most areas have leash laws, there will be times when keeping your dog on a leash is for his own safety. Learn how to introduce your dog or puppy to the leash, then teach him how to walk properly on the leash, even beside you on a bike. A loose leash walk teaches your dog not to pull or lunge when on ​the leash, making the experience more enjoyable for both you and your dog.