A train ride from Kansas City to California takes around 36 hours and 6 minutes.
Riding a train takes longer to reach a destination than it would take to fly or drive a car to the destination.
The train will also usually need to stop at train stations along the way and you may need to switch over trains so there could be some waiting times for you to wait at a train station for the other train.
So you may not be going straight through to California on the train ride.
So it may actually take you 48 hours or a little over 48 hours from Kansas City to California to reach the destination.
So make sure you factor in stops along the way but the absolute fastest you would get to California from Kansas City on a train is 36 hours not counting the stops along the way.
If you need to be in California fast you should fly or drive.