How Does the Number of Inputs and Outputs Affect the Size of a Transaction?
The number of inputs and outputs significantly affects the size of a transaction. Each input requires a signature and a reference to a previous transaction output, adding a substantial amount of data (bytes) to the new transaction.
Similarly, each output adds data, although typically less than an input. Therefore, a transaction consolidating funds from many previous small transactions (many inputs) or one sending funds to many different addresses (many outputs) will be much larger in size than a simple single-input, single-output transaction.