I (private individual) am going to apply for a patent, and would like to subsequently transfer the ownership of this application to a newly formed company. Is this possible or do i have to wait until the patent gets granted? If it is possible, does this operation have costs at USPTO?
Definitely - it is done by employee inventors right at the time of filing, for example.
The steps would be to draw up and sign an assignment agreement, record it with the USPTO (like recording a deed) and then submit a letter in the case identifying the new owner, it includes the recordation information. It is called establishing the right to take action in an application.
Recording used to cost $100 but the fee was reduced to $0 a few years ago. There would be no fees to the USPTO for this.
Some text from the MPEP
(c) Patents—Becoming of record. An assignee becomes of record as the applicant in a national patent application . . . by filing a statement in compliance with § 3.73(c) that is signed by a party who is authorized to act on behalf of the assignee.
(ii) A statement specifying where documentary evidence of a chain of title from the original owner to the assignee is recorded in the assignment records of the Office (e.g., reel and frame number).