Marriage is a sacred occassion for Hindus. While the necessity to marry a second wife is not desirable for men or a women. Therefore great care has to be exercised in uniting a girl and boy in wedlock. To ensure a long and happy married life, our sages jave devised a method of testing matrimonial adaptability which is called 'Marriage Matching'.
Marriage confers on the couple ewual responsibility in respect of  Dharma, Artha, Kama and Moksha which form the essence of human life. Dharma implies good conduct performing the various karmas prescribed by vedas and Shastras. Artha refers to one's acquisition of material things such as welath. Kama implies enjoyment of pleasures particularly, sexual pleasures. Moksha is the final salvation.
So marriage in Hindus is sacred ritual which confers on married couple a legal and dignified status in society.
Every grown-up boy and girl expect the married life to be happy and prosperous. A boy marries a girl with the firm belief that she will be an ideal wife and willing partner making his married life full of bliss and hapiness. In the same way a girl joins a boy in wedlock with hope that he will prove to be ideal husband supporting her with love and devotion throughout the life.
The ancient rishis and astrologers have devised Astrological guidelines and rules to test marriage adaptability and compatibility between a boy and a girl.
In Grihya soothram which is a part of Vedas, matching by comparing the Chamudrika Lakshanam of the boy and a girl is advocated . Owning to limitations in applying the science of Chamudrika Lakshnam our Rishis felt the need for an alternated method. So they devised the method of matching by Koota Agreement based on birth Stars of the boy and the girl. Originally they recommended 20 kootas. But out of these only 10 kootas are considered for the actual horoscope matching and in some parts of North India only 8 kootas are considered. Hence it also  popularly known as Das Porithan (Dasa means Ten).
Aryabhatt astrology software is widely used for the purpose of marriage compatibility. To know more about the software aryabhatt.htm.
Kootas and their Role
The Heavenly Bodies consisting of the 28 Nakshathras (Stars) including the Abijith set an oval round called the zodiac and the Navagrahas which transit this Zodiac exert their combined astral influences and regulated the level of human beings.
The Kootas agreement is ascertained by examining the birth stars and the Janma rasis, of the boy and girl. Each koota has a specific role or a part to play and reveals the result like a scanning machine.
(1) Dinam (Dinath Ayushyam Aarokyam) : The presence of   Dina Koota agreement ensures that the husband and wife remains healthy and free from diseases and will enjoy all comforts and long life.
(2) Ganam (Sobanam Ganam Evacha) : This koota ensures "sobhana karam:. Some Tamil authors interpret Sobhanakaram as "Dhampathya Relation" meaning compatible sex life. Some also view it as matching of human minds and temperament.
(3) Yoni ( Yonitho Dhampathy Sneham  ) : This is another koota which is interpreted in two ways. The word Yoni indicates the private reproductive organ of a women. So it is said that presence of Yoni Koota is must to ensure sexual compatibility. Under Yoni Koota each star is represented by an animal. If the animals representing the girl's star nd boy's star are friendly, there is agreement. If enemies, there is no agreement.
(4) Rasi ( Rasinam Vamsavirthi Kiruth ) : Vamsam means one's clan or dynsty. Vrithi means growth. This ensures the continuation of one's family through the birth of a son. If there is no progeny or issue, his family and tradition will end with him. Another school of thought interprets it as cordial relationship between the daughter-in-law and her in-laws. It seems reasonable as progney is indicated by other kootas also.
(5) Rasiyathipaty ( Santhanam Rasiythipathy ) :  This refers to the friendship between the lords of janma rasi of the girl and boy. This koota ensures santhanam. The word santhanam also means progeny which is denoted Rasi Koota. It seems to be duplication of roles. Elders opine that Santhanam does not merely mean progeny or purthrabhagyam, but noble children with yogam.
(6) Rajju ( Rajju Mngalya Vrithysyath ) :  This bestows on the wife "Deerga Mangalya Balam" means living happily with the husband for the long time. It is considered as the most important of the ten kootas as it ensures long life for the husband.
(7) Vedha ( Vedhaya Sohanasanam ) : Vedha means affliction. This koota agreement wards of all evils and pitfalls in married life. A happy and prosperous married life is assured as a result.
(8) Vasya ( Vasyath Anniyonnia Vasyaham ) : It is believed that the presence of this koota agreement assures mutual love and attachement.
(9) Mahendhram ( Mahendram Puthira Vrithisyath ) : It assures progeny i.e. children in a larger measure.
(10) Stree Deergam ( Stree Deergath Sarva Sampathha ) : It ensures accumalation of wealth etc. ie. allround prosperity.
(11) Nadi  : In some parts Nadi Koota is also considered. Nadi means pulse which is a medical term. So nadi koota ensures health, longivity of the couple and hapiness of children.
(12) Varna Koota : Here varna referes to the caste of the girland boy and it is having no or less relevance now a days as intercaste marriages have become common
The astrologers have given certain points to all these kootas, The points are totalled according to the matching of the horoscopes. If  there is matching of more than 50 percent points, then the couple is considered ideal for marriage.
Manglik (Mars) Matching :  One of the most important aspect of horoscope matching. There must be the compatibility of Mars between the male and female horoscope.
The perfect calculation of all these points requires, accurate and detailed horoscope involving intensive algorithms and computer programs. The computer software Aryabhatt is one of the best software, which is widely used in India for the purpose of Marriage Compatibility. Details of aryabhatt software is available at aryabhatt.htm