Two years after launching the world's most extensive AIDS screening program, the Defense Department has tested nearly 4 million people and identified 5,890 carrying the deadly virus.

The testing has cost $43.1 million so far and is projected to cost an additional $25.5 million this fiscal year.

The most recent statistics include test results not only for recruit applicants -- those trying to join the military -- but also for those on active duty and those in the National Guard and reserves.

They are the first statistics to provide a complete picture of test results through fiscal 1987, which ended last Sept. 30.

If all the groups are combined, the Pentagon has tested the blood of 3.96 million individuals since October 1985, when it launched the acquired immune deficiency syndrome screening effort. Of that total, roughly 1.5 cases of AIDS infection have been detected out of every 1,000 individuals screened, or 5,890 altogether.

On the active-duty side, the Defense Department said it had screened 2.18 million individuals over the past two years, of whom 3,336 tested positive.

Among the Army National Guard and Air National Guard members tested to date, there have been 387 positives out of 300,702 screened, the statistics show. As for the reserve units of the four services, where testing is only now becoming widespread, 183 cases have been found after screening 99,191 individuals.

And on the recruit applicant side, the Pentagon said that as of December it had screened 1.38 million men and women since the fall of 1985. Of that total, 1,984 tested positively.

AIDS is an incurable disease caused by a virus that attacks the body's immune system and its ability to resist infection. It is most frequently spread through sexual intercourse or the sharing of drug needles. According to the Centers for Disease Control, 51,916 Americans had been diagnosed as having AIDS as of Jan. 25, and an unknown but much greater number of people have been exposed to the virus.

Under Defense Department regulations, any recruit applicant who tests positively for the disease is automatically denied entry into the military. Active-duty personnel who test positively are allowed to remain in the service as long as they show no signs of the disease, but they are restricted from overseas assignments and their condition is closely monitored.

The overall military exposure rate of roughly 1.5 cases per 1,000 has changed little since the start of testing, although the Pentagon continues to chart differences between the various services, individuals from different regions, and men and women.

The Navy, with its bases concentrated on the East and West coasts, continues to post the highest exposure rate for active-duty personnel with roughly 2.5 cases per 1,000. The Army, by contrast, shows an exposure rate of 1.41 cases per 1,000; the Marine Corps, 1 case per 1,000, and the Air Force 0.99 case per 1,000.

Men are still much more likely to test positively for the disease than women, Pentagon statistics show, and blacks have a higher positive rate than whites. Among the recruit applicants tested since October 1985, the positive rate for men was 1.56 cases per 1,000, compared with 0.67 per 1,000 for women.

Pentagon officials said they believe the overall exposure rate they are seeing is probably higher than that for the American population as a whole, because recruit applicants are more likely to be young and sexually active.