<commit_before>---
title: Crypto Currency Average Calculator| Calculation Tools
layout: post
---
<html>

<head>
    <!-- Meta tags common for website -->
    {% include common-meta %}
    <title>{{ page.title }}</title>
    <!-- Tell the browser to be responsive to screen width -->
    <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
    <meta name="description"
        content="This is easy to use open source tool to calculate average price of crypto currency and token purchase" />
    <meta name="keywords" content="online,tool,calculator, crypto, bitcoin, currency, average, price" />
    <!-- CSS for the site theme -->
    {% include theme-css %}
    <!-- Annoying IE fixes -->
    {% include ie-fixes %}
</head>

<body class="hold-transition skin-green sidebar-mini">
    <!-- Site wrapper -->
    <div class="wrapper">

        <!-- header tag from theme -->
        {% include theme-header %}
        <!-- Sidebar for the whole website -->
        {% include theme-sidebar %}

        <!-- Content Wrapper. Contains page content -->
        <div class="content-wrapper">
            <!-- Main content -->
            <section class="content">
                <!-- left column -->
                <div class="box box-success">
                    <div class="box-header with-border">
                        <h3 class="box-title">Calculate Crypto Currency Average Price</h3>
                    </div>
                    <div class="box-body">
                        <div class="row">
                            <div class="col-xs-5">
                                <label for="quantity-1">Quantity Bought</label>
                            </div>
                            <div class="col-xs-5">
                                <label for="price-1">Price Paid</label>
                            </div>
                        </div>
                        <br/>
                        <div class="row">
                            <div class="col-xs-5">
                                <input class="form-control" id="quantity-1" value="" />
                            </div>
                            <div class="col-xs-5">
                                <input class="form-control" id="price-1" value="" />
                            </div>
                        </div>
                        <br/>
                        <div class="row">
                            <div class="col-xs-5">
                                <input class="form-control" id="quantity-2" value="" />
                            </div>
                            <div class="col-xs-5">
                                <input class="form-control" id="price-2" value="" />
                            </div>
                        </div>
                        <br/>
                        <div class="row">
                            <div class="col-xs-5">
                                <input class="form-control" id="quantity-3" value="" />
                            </div>
                            <div class="col-xs-5">
                                <input class="form-control" id="price-3" value="" />
                            </div>
                        </div>
                        <br/>
                        <div class="row">
                            <div class="col-xs-5">
                                <input class="form-control" id="quantity-4" value="" />
                            </div>
                            <div class="col-xs-5">
                                <input class="form-control" id="price-4" value="" />
                            </div>
                        </div>
                        <br/>
                        <div class="row">
                            <div class="col-xs-5">
                                <input class="form-control" id="quantity-5" value="" />
                            </div>
                            <div class="col-xs-5">
                                <input class="form-control" id="price-5" value="" />
                            </div>
                        </div>
                        <br/>
                        <div class="row">
                            <div class="col-xs-5">
                                <input class="form-control" id="quantity-6" value="" />
                            </div>
                            <div class="col-xs-5">
                                <input class="form-control" id="price-6" value="" />
                            </div>
                        </div>
                        <br/>
                        <div class="row">
                            <div class="col-xs-5">
                                <input class="form-control" id="quantity-6" value="" />
                            </div>
                            <div class="col-xs-5">
                                <input class="form-control" id="price-6" value="" />
                            </div>
                        </div>
                        <br/>
                        <div class="row">
                            <div class="col-xs-5">
                                <input class="form-control" id="quantity-7" value="" />
                            </div>
                            <div class="col-xs-5">
                                <input class="form-control" id="price-7" value="" />
                            </div>
                        </div>
                        <br/>
                        <div class="row">
                            <div class="col-xs-5">
                                <input class="form-control" id="quantity-8" value="" />
                            </div>
                            <div class="col-xs-5">
                                <input class="form-control" id="price-8" value="" />
                            </div>
                        </div>
                        <br/>
                        <div class="row">
                            <div class="col-xs-5">
                                <input class="form-control" id="quantity-9" value="" />
                            </div>
                            <div class="col-xs-5">
                                <input class="form-control" id="price-9" value="" />
                            </div>
                        </div>
                        <br/>
                        <div class="row">
                            <div class="col-xs-5">
                                <input class="form-control" id="quantity-10" value="" />
                            </div>
                            <div class="col-xs-5">
                                <input class="form-control" id="price-10" value="" />
                            </div>
                        </div>
                    </div>

                </div>
            </section>
            <section class="content">
                <div class="box box-success">
                    <div class="box-header with-border">
                        <h3 class="box-title">Average Price and Quantity</h3>
                    </div>
                    <!-- /.box-header -->
                    <div class="box-body">
                        <div class="row">
                            <div class="col-xs-5">
                                <p class="lead">Average Price</p>
                            </div>
                            <div class="col-xs-5">
                                <input class="form-control" id="averagePrice" value="" disabled/>
                            </div>
                        </div>                        <div class="row">
                            <div class="col-xs-5">
                                <p class="lead">Total Quantity</p>
                            </div>
                            <div class="col-xs-5">
                                <input class="form-control" id="totalQuantity" value="" disabled/>
                            </div>
                        </div>
                    </div>
                    <!-- /.box-body -->
                </div>
            </section>
            <section class="content">
                <div class="box box-success">
                    <div class="box-header with-border">
                        <h3 class="box-title">About Average Crypto Currency Price Calculator Tool</h3>
                    </div>
                    <!-- /.box-header -->
                    <div class="box-body">
                        <img class="img-responsive" src="images/cryptocurrency-average-calculator.jpg"
                            alt="Online CSS Button Generator Tool for website"
                            title="Online CSS Button Generator Tool for website">
                        <p>This is a free online tool to calculate average price of cryptos purchased. Can be really
                            handy tool when you have a dollar cost averaging investment and want to know what is your
                            average purchase price.</p>
                    </div>
                    <!-- /.box-body -->
                </div>
                <div class="box box-success">
                    <div class="box-header with-border">
                        <h3 class="box-title">Can I use this to calculate fractional quantity average price?</h3>
                    </div>
                    <!-- /.box-header -->
                    <div class="box-body">
                        <p>Yes, you can use this tool to calcualte on fractional quantity that is usually the case in all cryptocurrencies and also common in stock market for fractional shares.</p>
                    </div>
                    <!-- /.box-body -->
                </div>
                <div class="box box-success">
                    <div class="box-header with-border">
                        <h3 class="box-title">What is a average price?</h3>
                    </div>
                    <!-- /.box-header -->
                    <div class="box-body">
                        <p>Average price is calculated using total quantity purchased and total price paid. This tool
                            can also take care of fractional quantity.</p>
                    </div>
                    <!-- /.box-body -->
                </div>
                <div class="box box-success">
                    <div class="box-header with-border">
                        <h3 class="box-title">Can I use this to calculate average Bitcoin or Ethereum Price?</h3>
                    </div>
                    <!-- /.box-header -->
                    <div class="box-body">
                        <p>Yes, you can use this tool to calcualte  the average bitcoin or ethereum price you have
                            paid. This is a general purpose tool that can be used to caculate average price of anything
                            including stocks, crypto currencies like Algorand, Solana, Cardano, Avalanche, Polygon,
                            Loopring, Shiba Inu, Dodge Coin and more.</p>
                    </div>
                    <!-- /.box-body -->
                </div>
            </section>
            {% include addthis %}
        </div>
        <!-- /.content-wrapper -->
        {% include theme-footer %}
    </div>
    <!-- ./wrapper -->
    {% include theme-bottom-js %}

</body>
<script src="plugins/selectOnFocus/jquery.selectOnFocus.min.js"></script>

<script>
    $(document).ready(function () {
        const priceQuantityPairs = [];
        for (let index = 1; index < 11; index++) {
            const q = $(`#quantity-${index}`).val();
            const p = $(`#price-${index}`).val();
            if(q && p) {
                priceQuantityPairs.push({
                    price: Number.parseFloat(p),
                    quantity: Number.parseFloat(q)
                });
            }
        }
        console.log(`Transaction count: ${priceQuantityPairs.length}`);
        const totalQuantity = 0;
        (priceQuantityPairs || []).forEach(pair => {
            totalQuantity+=pair.quantity;
        });
        const totalPrice = 0;
        (priceQuantityPairs || []).forEach(pair => {
            totalPrice+=pair.price;
        });
        const average = totalPrice/totalQuantity;
        $('#averagePrice').val(average);
        $('#totalQuantity').val(totalQuantity);
        
        $('#calculators-category').addClass('active');
    });
</script>

</html><commit_msg>Read group of input fields<commit_after>---
title: Crypto Currency Average Calculator| Calculation Tools
layout: post
---
<html>

<head>
    <!-- Meta tags common for website -->
    {% include common-meta %}
    <title>{{ page.title }}</title>
    <!-- Tell the browser to be responsive to screen width -->
    <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
    <meta name="description"
        content="This is easy to use open source tool to calculate average price of crypto currency and token purchase" />
    <meta name="keywords" content="online,tool,calculator, crypto, bitcoin, currency, average, price" />
    <!-- CSS for the site theme -->
    {% include theme-css %}
    <!-- Annoying IE fixes -->
    {% include ie-fixes %}
</head>

<body class="hold-transition skin-green sidebar-mini">
    <!-- Site wrapper -->
    <div class="wrapper">

        <!-- header tag from theme -->
        {% include theme-header %}
        <!-- Sidebar for the whole website -->
        {% include theme-sidebar %}

        <!-- Content Wrapper. Contains page content -->
        <div class="content-wrapper">
            <!-- Main content -->
            <section class="content">
                <!-- left column -->
                <div class="box box-success">
                    <div class="box-header with-border">
                        <h3 class="box-title">Calculate Crypto Currency Average Price</h3>
                    </div>
                    <div class="box-body">
                        <div class="row">
                            <div class="col-xs-5">
                                <label for="quantity-1">Quantity Bought</label>
                            </div>
                            <div class="col-xs-5">
                                <label for="price-1">Price Paid</label>
                            </div>
                        </div>
                        <br/>
                        <div class="row">
                            <div class="col-xs-5">
                                <input class="form-control tx-input-field" id="quantity-1" value="" />
                            </div>
                            <div class="col-xs-5">
                                <input class="form-control tx-input-field" id="price-1" value="" />
                            </div>
                        </div>
                        <br/>
                        <div class="row">
                            <div class="col-xs-5">
                                <input class="form-control tx-input-field" id="quantity-2" value="" />
                            </div>
                            <div class="col-xs-5">
                                <input class="form-control tx-input-field" id="price-2" value="" />
                            </div>
                        </div>
                        <br/>
                        <div class="row">
                            <div class="col-xs-5">
                                <input class="form-control tx-input-field" id="quantity-3" value="" />
                            </div>
                            <div class="col-xs-5">
                                <input class="form-control tx-input-field" id="price-3" value="" />
                            </div>
                        </div>
                        <br/>
                        <div class="row">
                            <div class="col-xs-5">
                                <input class="form-control tx-input-field" id="quantity-4" value="" />
                            </div>
                            <div class="col-xs-5">
                                <input class="form-control tx-input-field" id="price-4" value="" />
                            </div>
                        </div>
                        <br/>
                        <div class="row">
                            <div class="col-xs-5">
                                <input class="form-control tx-input-field" id="quantity-5" value="" />
                            </div>
                            <div class="col-xs-5">
                                <input class="form-control tx-input-field" id="price-5" value="" />
                            </div>
                        </div>
                        <br/>
                        <div class="row">
                            <div class="col-xs-5">
                                <input class="form-control tx-input-field" id="quantity-6" value="" />
                            </div>
                            <div class="col-xs-5">
                                <input class="form-control tx-input-field" id="price-6" value="" />
                            </div>
                        </div>
                        <br/>
                        <div class="row">
                            <div class="col-xs-5">
                                <input class="form-control tx-input-field" id="quantity-6" value="" />
                            </div>
                            <div class="col-xs-5">
                                <input class="form-control tx-input-field" id="price-6" value="" />
                            </div>
                        </div>
                        <br/>
                        <div class="row">
                            <div class="col-xs-5">
                                <input class="form-control tx-input-field" id="quantity-7" value="" />
                            </div>
                            <div class="col-xs-5">
                                <input class="form-control tx-input-field" id="price-7" value="" />
                            </div>
                        </div>
                        <br/>
                        <div class="row">
                            <div class="col-xs-5">
                                <input class="form-control tx-input-field" id="quantity-8" value="" />
                            </div>
                            <div class="col-xs-5">
                                <input class="form-control tx-input-field" id="price-8" value="" />
                            </div>
                        </div>
                        <br/>
                        <div class="row">
                            <div class="col-xs-5">
                                <input class="form-control tx-input-field" id="quantity-9" value="" />
                            </div>
                            <div class="col-xs-5">
                                <input class="form-control tx-input-field" id="price-9" value="" />
                            </div>
                        </div>
                        <br/>
                        <div class="row">
                            <div class="col-xs-5">
                                <input class="form-control tx-input-field" id="quantity-10" value="" />
                            </div>
                            <div class="col-xs-5">
                                <input class="form-control tx-input-field" id="price-10" value="" />
                            </div>
                        </div>
                    </div>

                </div>
            </section>
            <section class="content">
                <div class="box box-success">
                    <div class="box-header with-border">
                        <h3 class="box-title">Average Price and Quantity</h3>
                    </div>
                    <!-- /.box-header -->
                    <div class="box-body">
                        <div class="row">
                            <div class="col-xs-5">
                                <p class="lead">Average Price</p>
                            </div>
                            <div class="col-xs-5">
                                <input class="form-control" id="averagePrice" value="" disabled/>
                            </div>
                        </div>                        <div class="row">
                            <div class="col-xs-5">
                                <p class="lead">Total Quantity</p>
                            </div>
                            <div class="col-xs-5">
                                <input class="form-control" id="totalQuantity" value="" disabled/>
                            </div>
                        </div>
                    </div>
                    <!-- /.box-body -->
                </div>
            </section>
            <section class="content">
                <div class="box box-success">
                    <div class="box-header with-border">
                        <h3 class="box-title">About Average Crypto Currency Price Calculator Tool</h3>
                    </div>
                    <!-- /.box-header -->
                    <div class="box-body">
                        <img class="img-responsive" src="images/cryptocurrency-average-calculator.jpg"
                            alt="Online CSS Button Generator Tool for website"
                            title="Online CSS Button Generator Tool for website">
                        <p>This is a free online tool to calculate average price of cryptos purchased. Can be really
                            handy tool when you have a dollar cost averaging investment and want to know what is your
                            average purchase price.</p>
                    </div>
                    <!-- /.box-body -->
                </div>
                <div class="box box-success">
                    <div class="box-header with-border">
                        <h3 class="box-title">Can I use this to calculate fractional quantity average price?</h3>
                    </div>
                    <!-- /.box-header -->
                    <div class="box-body">
                        <p>Yes, you can use this tool to calcualte on fractional quantity that is usually the case in all cryptocurrencies and also common in stock market for fractional shares.</p>
                    </div>
                    <!-- /.box-body -->
                </div>
                <div class="box box-success">
                    <div class="box-header with-border">
                        <h3 class="box-title">What is a average price?</h3>
                    </div>
                    <!-- /.box-header -->
                    <div class="box-body">
                        <p>Average price is calculated using total quantity purchased and total price paid. This tool
                            can also take care of fractional quantity.</p>
                    </div>
                    <!-- /.box-body -->
                </div>
                <div class="box box-success">
                    <div class="box-header with-border">
                        <h3 class="box-title">Can I use this to calculate average Bitcoin or Ethereum Price?</h3>
                    </div>
                    <!-- /.box-header -->
                    <div class="box-body">
                        <p>Yes, you can use this tool to calcualte  the average bitcoin or ethereum price you have
                            paid. This is a general purpose tool that can be used to caculate average price of anything
                            including stocks, crypto currencies like Algorand, Solana, Cardano, Avalanche, Polygon,
                            Loopring, Shiba Inu, Dodge Coin and more.</p>
                    </div>
                    <!-- /.box-body -->
                </div>
            </section>
            {% include addthis %}
        </div>
        <!-- /.content-wrapper -->
        {% include theme-footer %}
    </div>
    <!-- ./wrapper -->
    {% include theme-bottom-js %}

</body>
<script src="plugins/selectOnFocus/jquery.selectOnFocus.min.js"></script>

<script>
    const caculate = () => {
        const priceQuantityPairs = [];
        for (let index = 1; index < 11; index++) {
            const q = $(`#quantity-${index}`).val();
            const p = $(`#price-${index}`).val();
            if(q && p) {
                priceQuantityPairs.push({
                    price: Number.parseFloat(p),
                    quantity: Number.parseFloat(q)
                });
            }
        }
        console.log(`Transaction count: ${priceQuantityPairs.length}`);
        const totalQuantity = 0;
        (priceQuantityPairs || []).forEach(pair => {
            totalQuantity+=pair.quantity;
        });
        const totalPrice = 0;
        (priceQuantityPairs || []).forEach(pair => {
            totalPrice+=pair.price;
        });
        const average = totalPrice/totalQuantity;
        $('#averagePrice').val(average);
        $('#totalQuantity').val(totalQuantity);
    };
    $(document).ready(function () {
        $(".tx-input-field").on("input", function() {
            caculate();
        });
        

        $("#averagePrice").selectOnFocus();
        $("#totalQuantity").selectOnFocus();
        $('#calculators-category').addClass('active');
    });
</script>

</html>
{'fraction_non_alphanumeric': 0.12950033155205368, 'fraction_numerical': 0.005694894098373445, 'mean_word_length': 0.936404833836858, 'pattern_counts': {'":': 0, '<': 467, '<?xml version=': 0, '>': 470, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '99552', 'n_tokens_mistral': 6232, 'n_tokens_neox': 5798, 'n_words': 1436}