Director Gus Van Sant at one point asked Matt Damon and Ben Affleck to rewrite the script so that Chuckie is killed in a construction accident. Damon and Affleck protested, but reluctantly wrote the scene in. After Van Sant read it, he agreed that it was a terrible idea.
Robin Williams' last line in the film, "That son of a bitch, he stole my line," was ad-libbed.
The mathematical equations seen in the opening credits are part of a math technique called "Fourier Analysis" which approximates functions by sines and cosines. It's used a lot in physics and engineering.
The scene where Sean and Will are in his office, and Sean starts talking about his dead wife and her farting antics. These lines were ad-libbed by Robin Williams, which is probably why Matt Damon is laughing so hard. If you watch the scene carefully you can notice the camera shaking, probably due to the cameraman laughing as well.
The job interview Will sends Chuckie on is for a company called Holden & McNeil. Ben Affleck's character in Chasing Amy (1997) was Holden McNeil.
Minnie Driver's character Skylar is named after Damon's girlfriend, Skylar Satenstein, who left Damon for Metallica drummer Lars Ulrich before filming began. Damon and Driver became romantically involved during production.
In the scene on the park bench, Robin Williams gives an example of love that Will hasn't experienced as "going to hell and back for it." In his next movie, What Dreams May Come (1998), Williams does just that for his love played by Annabella Sciorra after she commits suicide.
The lecture hall in the movie is actually a lecture hall in McLennan Physical Laboratories (MP); a building at the University of Toronto (St. George Campus) in Toronto, Ontario, Canada.
The subway car Will rides in is a model that was retired in 1994; the MBTA took one out of mothballs and cleaned it up for the production.