Thirty per person plus service tax plus IRCTC and Bank charges (if applicable) will be deducted if it is a WAITLISTED/RAC ticket.
PS: This one doesn't depend on when you cancel it. As long as the status stays in WL/RAC, the same amount will be deducted (before chart preparation).