The 8400 is a great chip, for Gaming. Productivity workloads, it's not the best IMO.
Still a very good option for the money.
Boost clock is automatic. When one core is in use, the 8400 will boost to 4GHz, 3.9GHz for 2-4 cores, 3.8GHz for 5-6cores in use.
Clock speed is not linear, so you cannot directly compare two chips (unless identical in other ways) and say X GHz is better than Y GHz.
3.8GHz though, on a modern Intel CPU with good IPC, is a pretty good chip, yes.
The 'problem' with the 8400 though, is limited motherboard availability. You have to buy a Z370 board, making a 6 core (no overclocking + Overclocking capable board) a ~$300-$350 investment.
Relatively comparable AMD offerings offer a lower IPC generally, but offer 6core/12thread for around $250.
PCPartPicker part list /
Price breakdown by merchant
CPU: AMD - Ryzen 5 1600 3.2GHz 6-Core Processor ($197.79 @ SuperBiiz)
Motherboard: MSI - B350 PC MATE ATX AM4 Motherboard ($59.99 @ Newegg)
Total: $257.78
Prices include shipping, taxes, and discounts when available
Generated by PCPartPicker 2018-01-19 19:19 EST-0500
Heck, you can have 8core/16thread for comparable(ish) money to an 8400.
PCPartPicker part list /
Price breakdown by merchant
CPU: AMD - Ryzen 7 1700 3.0GHz 8-Core Processor ($288.99 @ SuperBiiz)
Motherboard: MSI - B350 PC MATE ATX AM4 Motherboard ($59.99 @ Newegg)
Total: $348.98
Prices include shipping, taxes, and discounts when available
Generated by PCPartPicker 2018-01-19 19:20 EST-0500
It'll all depend on your specific workloads as to what constitutes a "good" buy.