user87933: What is the weight unit cost of an input? And can you batch/aggregate the inputs or is it linearly growth when you add more inputs to a tx?

user60443: 
What is the weight unit cost of an input?

2 things affect the weight of a tx, the total number of bytes , and the total bytes minus witness data.
Transaction Weight = Base transaction size * 3 + Total transaction size, where
Base transaction size is the size of the transaction serialised with the witness data stripped.
Total transaction size is the transaction size in bytes serialized as described in BIP144, including base data and witness data.
See BIP141

Can you batch/aggregate the inputs or is it linearly growth when you
  add more inputs to a tx?

You can't batch inputs, but you can combine them and send them back to yourself first in a larger amount, but that requires an additional transaction. Probably the best you can do now is to use a segwit address to receive funds so when you go to spend the inputs, the witness data lowers the weight of each input.

user29432: The weight of a single input in a transaction always uses:

32 bytes to reference the outpoint id (hash)
4 bytes to reference the outpoint index

Then, if the outpoint is a non-segwit p2pkh output the scriptSig uses:

1 byte to denote the scriptSig size
1 byte to denote the signature size
71 bytes (on average) for the signature
1 byte to denote the public key size
33 bytes for the public key

In total this makes 143 bytes (on average) to reference a non-segwit p2pkh output with your spending transaction.
For segwit p2sh nested p2pkh outputs, the scriptSig uses instead:

1 byte to denote the scriptSig size
1 byte to denote the witness version (0x00)
1 byte to denote the public key hash size
20 bytes for the public key hash

Further, the witnessScript will use the same amount of bytes as the scriptSig for spending non-witness p2pkh outpoints. However, the witnessScript only counts with a quarter to the total weight.
Therefore a segwit p2sh nested input has a weight contribution of 59 bytes + (107)/4 bytes = 86 bytes on average.

87933: <p>What is the weight unit cost of an input? And can you batch/aggregate the inputs or is it linearly growth when you add more inputs to a tx?</p>
 60443: <blockquote>
  <p>What is the weight unit cost of an input?</p>
</blockquote>

<p>2 things affect the weight of a tx, the total number of bytes , and the total bytes minus witness data.</p>

<p><code>Transaction Weight = Base transaction size * 3 + Total transaction size</code>, where</p>

<p><strong>Base transaction size</strong> is the size of the transaction serialised with the witness data stripped.</p>

<p><strong>Total transaction size</strong> is the transaction size in bytes serialized as described in <a href="https://github.com/bitcoin/bips/blob/master/bip-0144.mediawiki" rel="nofollow noreferrer">BIP144</a>, including base data and witness data.</p>

<p>See <a href="https://github.com/bitcoin/bips/blob/master/bip-0141.mediawiki" rel="nofollow noreferrer">BIP141</a></p>

<blockquote>
  <p>Can you batch/aggregate the inputs or is it linearly growth when you
  add more inputs to a tx?</p>
</blockquote>

<p>You can't batch inputs, but you can combine them and send them back to yourself first in a larger amount, but that requires an additional transaction. Probably the best you can do now is to use a segwit address to receive funds so when you go to spend the inputs, the witness data lowers the weight of each input.</p>
 29432: <p>The weight of a single input in a transaction always uses:</p>

<ul>
<li><code>32</code> bytes to reference the outpoint id (hash)</li>
<li><code>4</code> bytes to reference the outpoint index</li>
</ul>

<p>Then, if the outpoint is a non-segwit p2pkh output the scriptSig uses:</p>

<ul>
<li><code>1</code> byte to denote the scriptSig size</li>
<li><code>1</code> byte to denote the signature size</li>
<li><code>71</code> bytes (on average) for the signature</li>
<li><code>1</code> byte to denote the public key size</li>
<li><code>33</code> bytes for the public key</li>
</ul>

<p>In total this makes <code>143</code> bytes (on average) to reference a non-segwit p2pkh output with your spending transaction.</p>

<p>For segwit p2sh nested p2pkh outputs, the scriptSig uses instead:</p>

<ul>
<li><code>1</code> byte to denote the scriptSig size</li>
<li><code>1</code> byte to denote the witness version (0x00)</li>
<li><code>1</code> byte to denote the public key hash size</li>
<li><code>20</code> bytes for the public key hash</li>
</ul>

<p>Further, the witnessScript will use the same amount of bytes as the scriptSig for spending non-witness p2pkh outpoints. However, the witnessScript only counts with a quarter to the total weight.</p>

<p>Therefore a segwit p2sh nested input has a weight contribution of <code>59</code> bytes + (<code>107</code>)/4 bytes = <code>86</code> bytes on average.</p>
