The amount available for a Medical FSA = the total amount you elected for the current plan year minus any prior payments and reimbursements.
The amount available for a Dependent Care FSA = the total payroll deductions posted to your Account for the current plan year minus any prior payments and reimbursements.