The sensorimotor transformation underlying Caenorhabditis elegans chemotaxis has been difficult to measure directly under normal assay conditions. Thus, key features of this transformation remain obscure, such as its time course and dependence on stimulus amplitude. Here, we present a comprehensive characterization of the transformation as obtained by inducing stepwise temporal changes in attractant concentration within the substrate as the worm crawls across it. We found that the step response is complex, with multiple phases and a nonlinear dependence on the sign and amplitude of the stimulus. Nevertheless, the step response could be reduced to a simple kinetic model that predicted the results of chemotaxis assays. Analysis of the model showed that chemotaxis results from the combined effects of approach and avoidance responses to concentration increases and decreases, respectively. Surprisingly, ablation of the ASE chemosensory neurons, known to be necessary for chemotaxis in chemical gradient assays, eliminated avoidance responses but left approach responses intact. These results indicate that the transformation can be dissected into components to which identified neurons can be assigned.