We describe a quantitative orientation-independent differential interference contrast (DIC) microscope, which allows bias retardation to be modulated and shear directions to be switched rapidly without any mechanical movement. The shear direction is switched by a regular liquid-crystal cell sandwiched between two standard DIC prisms. Another liquid-crystal cell modulates the bias. Techniques for measuring parameters of DIC prisms and calibrating the bias are shown. Two sets of raw DIC images with the orthogonal shear directions are captured within 1 s. Then the quantitative image of optical path gradient distribution within a thin optical section is computed. The gradient data are used to obtain a quantitative distribution of the optical path, which represents the refractive index gradient or height distribution. Computing enhanced regular DIC images with any desired shear direction is also possible.