Carl E. Stotz, the lumberyard clerk who stumbled over a lilac bush during a backyard game of catch with his two young nephews in 1938 and came up with the idea for Little League baseball, died yesterday at Williamsport Hospital in Pennsylvania.

He was 82 years old and died of a heart attack, his family said.

Although he eventually broke with the organization he founded, Mr. Stotz, a lifelong Williamsport resident who later served as tax collector there, never tired of describing the summertime mishap that launched the vast Little League game now played by more than 2.5 million youngsters in more than 30 countries. Dimensions for Boys

As he frequently recalled it, Mr. Stotz banged a leg against the bush, then while he sat on the back steps and the pain subsided, he suddenly blurted out to his nephews:

"How would you like to play on a regular team with uniforms, your own cap, a new ball for every game and bats your size?"

A few weeks later he crammed most of the neighborhood into his 1934 Plymouth and set in search of the perfect field and the perfect game. By the end of the summer he had devised the stripped-down, boys'-sized dimensions at the core of Little League's eventual spectacular success: 60 feet between the bases (two-thirds of the major league distance) and 46 feet from the pitcher's mound to home plate (instead of 60 feet 6 inches). Expansion Comes Quickly