THE sun'll come out tomorrow, but it won't be shining on "Annie." This afternoon, five years and eight months after it opened on Broadway, the musical about the little girl in the red dress will give its final performance in the Uris Theatre.

That makes 2,377 performances in all, which qualifies "Annie" for seventh place on the list of longest-running Broadway musicals, just below "O Calcutta!" (2,617 and still playing) and just above "Man of La Mancha" (2,329). The Broadway company and the various national companies have grossed more than $200 million, for a profit that is currently in the neighborhood of $19 million and climbing.

Among other things, the musical made a star of Andrea McArdle, brought long-overdue recognition to Dorothy Loudon, saved a dog from certain death in a Connecticut pound and gave millions of stage mothers across the country renewed reason to hope. It has also made its creators--Martin Charnin (direction and lyrics), Thomas Meehan (book) and Charles Strouse (music)--enormously wealthy men.

For the Kennedy Center, which was a last-minute investor in "Annie," the show has proved to be the equivalent of a fairy godmother, feeding $5 million back into the coffers. In the culture business, that is not a vast sum, but it has nonetheless helped the Center keep the inevitable deficits at bay.

A whole generation of young girls can now sing "Tomorrow" from beginning to end. It is even thought by some amateur sociologists that "Annie," the pick-me-up musical par excellence, may have helped restore the morale of a nation battered by Watergate and Vietnam.

With his characteristic understatement, Roger Stevens, the Center's chairman, says, "It's seems to have worked out well for everybody."

Herewith, selected items for an unofficial Annie Memorial Almanac: How About Liz Taylor in a Red Wig and Matching Caftan?

One reason that "Annie" took so long to reach the stage--four years from its inception to the opening-night curtain--was that there were no stars attached to the project, and when you're looking for investors, no stars generally means no money. In Charnin's view, the show itself was to be the star, and he persisted in his belief that the role of Annie had to be played by a bona fide child. Nonetheless, two New York agents, being helpful, submitted their candidates for the leading role: Bernadette Peters and Bette Midler. Where You Can See 'Annie,' or Could Have

There are, will be or already have been productions of "Annie" in Denmark, Norway, Sweden, Finland, Holland, Japan, Australia, South Africa, Venezuela, New Zealand, West Germany, Ireland, the Phillipines, Spain, Greece, Argentine and Mexico, where it is called "Anita." After playing 3 1/2 years in London's West End, the British edition toured the sceptered isle for a year, then came back to London, where it reopened last month to a new set of raves. At the peak of its popularity in the United States, "Annie" had four touring companies playing simultaneously, in addition to the Broadway version. Currently, only a bus and truck company is left to carry on the tradition. It is booked through the spring, at which time the stock and amateur rights will be released. That means that in short order you are likely to see "Annie" in community and dinner theaters everywhere. Stock and amateur rights are expected to bring in another $4 million to $7 million in profits over the next decade. It is fair to assume that a lot of those future Annies are still in diapers. The Best Investment The Kennedy Center Ever Made

"Annie" was capitalized at $800,000, but just before it was to go into rehearsal, it was still shy of that goal. Roger Stevens came to the rescue with $180,000, making the Kennedy Center one of the show's producers. As such, it is entitled to a producer's fee of 1 3/8 percent of the overall gross and also receives 22 percent of the profits. All told, that has amounted to approximately $5 million so far, although checks should continue coming in for another 15 years.

"The money has been very crucial over the past five years," says Stevens. "It's enabled us to do the sort of cultural productions which we know in advance will lose money, but which we feel we should do just the same--ballet, opera, imports from abroad. Last season, for example, we couldn't have done 'Medea' and 'Tartuffe' otherwise. Or things like 'Mass,' which lost money the second time around, the Bolshoi, or Tom Stoppard's 'Night and Day.' "

In short, "Annie" has amounted to a virtual subsidy at a time when governmental and corporate subsidies are being whittled back. Unfortunately, shows like "Annie" or "A Chorus Line," which has been pumping revenue into the New York Shakespeare Festival, are as rare as they are welcome. For the Center, the only other payoff that has remotely approached the "Annie" jackpot has been provided by "Pippin," which has returned about $1.2 million on an investment of $100,000. You Can Relax Now, Yul

Reid Shelton, who originated Daddy Warbucks and played him for 2 1/2 years on Broadway and another 2 1/2 on the road, agreed to shave his head for the role, if he was provided with a Norelco razor. Shaving his pate twice a day, morning and night, he managed to go through three electric razors in all. Recently he moved to Los Angeles, where he bought a house ("the house that Annie built") and began successfully canvassing for TV employment. He is also letting his hair grow back. "It's almost snow white, with streaks of blonde in it. Not having seen it for five years, I think it's gorgeous and so does everybody else," he says. "I'm having great fun washing it and keeping it in shape." And I Suppose a Tank of Gas Is Still $10?

If you had caught "Annie" in its very first incarnation at the Goodspeed Opera House in East Haddam, Conn., during the summer of 1976, it would have cost you $12 for the best seat in the house. A box seat for the pre-Broadway tryout in the Kennedy Center Eisenhower Theater the following March went for $15. When "Annie" opened on Broadway on April 21, 1977, the price for a Saturday night orchestra seat was $17.50. But had you waited until, say, last month to see the show, that same orchestra seat would have run you $35. On the other hand, if you hurry, you can always catch the movie version with Carol Burnett, Albert Finney and Aileen Quinn. It goes for $4 to $5. However, no one who has shelled out for the movie seems particularly eager to boast about the savings. The Review That Almost Killed 'Annie'

Walter Kerr, the powerful critic for the Sunday New York Times, dropped in on "Annie" while it was still testing its wings at the Goodspeed Opera House. "Did you ever have the feeling," he wrote afterward, "of being totally dislocated in the theater, so that one minute you seemed to know exactly where you stood in time and space and the very next you felt yourself on the down escalator going up?" Well, Kerr apparently did. He branded the show "mildly agreeable, but ideologically treacherous." The downbeat appraisal gave serious pause to some of "Annie's" potential backers and for a while it looked as if the show wouldn't go on to Broadway at all. Everybody Has the Right To Change His Mind

The show that Kerr saw at the Goodspeed wasn't exactly the same show that opened eight months later in New York at the Alvin Theatre. Kerr wasn't quite so peevish the second time around, either. "We're forthrightly invited to lose our minds at the Alvin," he wrote, "and that--reluctantly at first, then helplessly--is what we do." Why It's Nice to Have a Big Hit on Broadway, in Addition to All the Dough

Charnin says the real reward is "not feeling desperate about your next job, not being forced into projects you're not sure about. I can make my own mistakes now, instead of other people's." Don't Call Us. We'll Call You.

Whenever calls went out for new orphans or new Annies to fill the ranks, young girls and their mothers invariably turned out in swarms. Among the ploys they used to get noticed, perhaps none was so startling as the moppet who chose as her audition song "T--- and A--" from "A Chorus Line." By rough estimate, about 12,000 girls auditioned for the various parts over the years. In London alone, 2,800 showed up, including a planeload from Glasgow who sang "Tomorrow" in generally impenetrable accents. Only one boy, however, bothered to give it a try. Appearing at an open call in New York, he said he didn't understand why a male couldn't be one of the orphans. He was told that would be historically inaccurate--the sexes were segregated back then--but was allowed to audition anyway. He didn't get the part.

One actress came to her audition for the part of Miss Hannigan (the director of the orphanage) dressed in black leather pants and leather jacket and carrying a bullwhip. She didn't get the part, either. Once a Child Star, Not Always a Child Star

Andrea McArdle, the original Annie, is now 19 and recently returned from California where she played another Annie: Annie Oakley in the San Bernardino Civic Light Opera's production of "Annie Get Your Gun." Most observers say she's handling the passage from child star to adult performer with grace. "When you're a child, it's relatively easy to act. You're not inhibited," she notes. "As you get older, you develop a lot of hang-ups. It was tough, but I think I've made the transition. It came late for me--around 16."

Sarah Jessica Parker, the third in the line of Broadway Annies, is now Patty, the teen-age misfit in the CBS sitcom "Square Pegs." Danielle Brisebois, the smallest of the original orphans, was spotted by the producers of "All in the Family," who subsequently developed a role for her on the series, as a streetwise but vulnerable child. Stephanie, as the character is called, now turns up on "Archie Bunker's Place." But Will They Also Clap?

Dorothy Loudon was memorable as Miss Hannigan, hater of happiness and scourge of orphans. But initially she was reluctant to take the role. "I was absolutely convinced that I'd get hate mail and that people would throw things at me," she explains. The worst thing that happened occurred backstage during the first preview in the Eisenhower Theater. Loudon caught her foot in a treadmill and broke a toe. Later that night she hobbled off to the White House, where for the first social event of the new administration, President and Mrs. Carter presented an abbreviated version of the show to the nation's governors. The governors also got dinner. The show got bravoes. Loudon's foot got better. And she eventually won a Tony. Why 'Annie' Was a Hit (Part I)

Says Charnin: "Nobody believes for a single solitary second that this is how things are, but it certainly is a musical about how we want things to be. We want to believe the president of the United States drops everything and sends his best secret agent in search of an orphan's parents. Or that the richest man in the world would adopt the poorest orphan. It's all wish fulfilment. At the same time, if you're counting laughs per show, you can put 'Annie' up there with the best of them. Miss Hannigan is the spoonful of medicine that makes the sugar go down." Why 'Annie' Was a Hit (Part II)

Says Roger Stevens: "I've always liked Charles Strouse's music. I think that's the underrated part of 'Annie.' Anyone can play Annie or Daddy Warbucks and the show still sells out. It's the music that is the constant." Stevens' favorite song: "We Want to Thank You, Herbert Hoover," sung by the disgruntled and the out-of-work in a New York City Hooverville. Why 'Annie' Was a Hit (Part III)

Says Reid Shelton: "I think the country was going through a down period. Nothing seemed to be working. Our leaders were turning out to be less than we hoped. Along came a show about a little girl who won't get discouraged and ends up getting out of life what she wants. The timing was perfect. People wanted to believe in something. If they couldn't believe in anything else, they were at least going to believe in Daddy Warbucks, Annie and the dog." Just Mommy & Me & Baby Makes Three

Unlike tickets to most Broadway shows, which sell in pairs, "Annie" tickets regularly sold in odd numbers--in threes, fives, sevens or an entire row. It was a manifestation of what Charnin calls "the safety factor. Parents don't feel they can trust movie ratings these days, but they felt they could safely take their kids to 'Annie.' " And did. Could I Have Your Paw Print, Please?

According to David Powers, "Annie's" press agent, the most popular performer in the show was Sandy. Discovered in a Connecticut pound only 24 hours before he was to be put to sleep, the mutt has achieved superstardom on a par with Lassie's. "He's the ideal star," says Powers. "He's not temperamental. He never takes a vacation and he's only missed a couple of performances because he was sick." In 1979 Sandy took a brief leave from the show to play Las Vegas alongside McArdle, who was appearing there with Liberace. Sandy got first-class plane fare out to Las Vegas and was put up in Liberace's mansion, but did not have to wear fur and rhinestones.

His trainer, Bill Berloni, was an apprentice technician at the Goodspeed Opera House when he found Sandy at the Newington Pound and sprung him for $8. Now Berloni has a flourishing animal talent agency, which supplies trained animals for Broadway shows and television commercials. Sandy is thought to be about 8 1/2 years old, a respectable age for retirement, although offers for personal appearances and commercials continue to come in. Sandy, says Powers, is the only Broadway star with "true animal magnetism." Where Are the Annie Frozen Dinners?

It's not just ticket sales that rake in the money. A hit Broadway musical can become, these days, a virtual industry. The "Annie" original cast recording has long since gone over the 1 million mark in sales. Hollywood paid $9.5 million for the film rights. There have also been Annie dolls, dresses, lunch pails, felt-tip pens, calendars, wallpaper, sheets, music boxes, mugs, books, belts, T-shirts and pendants, not to mention stuffed Sandys. Since the show opened, some 400 Annie-related products have been officially licensed. "Annie," comments one observer, "is a terrific role model for a lot of young girls." What Now, Marty?

A follow-up, what else. Charnin and Meehan have already worked up a first draft for "Annie II," which will begin with the last scene of "Annie" and cover the next six months in Annie's life, lest you're worried about her turning up in serious de'collete'. Most of the familiar characters will be back. Miss Hannigan, having been carted off to prison at the end of "Annie," will escape for the sequel and come looking for revenge. Daddy Warbucks will lose all his money, but may have a compensating relationship with his secretary, Grace Farrell. "We want to tie up all the loose ends," says Charnin. Right now he's aiming to go into rehearsal next summer. The dream? "I'd love to be able to do 'Annie' at matinees and then follow it up with 'Annie II' at night."

Nicholas Nickleby, en garde.