A silicon based frequency domain near infrared spectroscopy (fdNIRS) with integrated transcranial direct-current stimulation (tDCS) on chip is designed to enable non-invasive closed-loop brain stimulation for neuro diseases treatment and cognitive performance enhancement. The dual channel fdNIRS system amplifies, filters, and downconverts the received photocurrent in a heterodyning scheme with a dynamic range of 10nA to 450nA and a detectable phase shift down to 0.2°. Each channel provides a transimpedance gain of 120dBΩ at 80MHz with a power consumption of 30mW while tolerating up to 8pF input capacitance. The on chip programmable stimulator can support a stimulating current from 0.6mA to 2.2mA with 1% accuracy, which covers the required current range of tDCS. A time-multiplexer is also embedded to support multi-distance fdNIRS measurements. The chip is fabricated in a standard 130nm CMOS process and occupies an area of 2.25mm2.