Normally the program will do this for you.
Be sure to enter everything through the interview: Federal > Deductions and Credits. They should then carryover to state as applicable.